Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/nuts/agent.generate.template.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('agent generate template NUTs', function () {

execCmd<AgentGenerateTemplateResult>(
`agent generate template --agent-file ${invalidAgentFile} --agent-version ${agentVersion} --output-dir ${outputDir} --json`,
{ ensureExitCode: 1 }
{ ensureExitCode: 'nonZero' }
);
});

Expand Down
4 changes: 2 additions & 2 deletions test/nuts/agent.generate.test-spec.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('agent generate test-spec NUTs', function () {
const outputFile = join(session.project.dir, 'specs', genUniqueString('testSpec_%s.yaml'));

execCmd(`agent generate test-spec --from-definition ${invalidFile} --output-file ${outputFile} --force-overwrite`, {
ensureExitCode: 1,
ensureExitCode: 'nonZero',
});
});

Expand All @@ -75,7 +75,7 @@ describe('agent generate test-spec NUTs', function () {
const outputFile = join(session.project.dir, 'specs', genUniqueString('testSpec_%s.yaml'));

execCmd(`agent generate test-spec --from-definition ${invalidFile} --output-file ${outputFile} --force-overwrite`, {
ensureExitCode: 1,
ensureExitCode: 'nonZero',
});
});
});
6 changes: 3 additions & 3 deletions test/nuts/agent.test.create.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ describe('agent test create', function () {
const normalizedInvalidSpecPath = normalize(invalidSpecPath).replace(/\\/g, '/');
execCmd<AgentTestCreateResult>(
`agent test create --api-name "${testApiName}" --spec "${normalizedInvalidSpecPath}" --target-org ${getUsername()} --preview --json`,
{ ensureExitCode: 1 }
{ ensureExitCode: 'nonZero' }
);
});

it('should fail when required flags are missing in JSON mode', async () => {
// Missing --api-name
execCmd<AgentTestCreateResult>(`agent test create --target-org ${getUsername()} --json`, {
ensureExitCode: 1,
ensureExitCode: 'nonZero',
});

// Missing --spec
const testApiName = genUniqueString('Test_Agent_%s');
execCmd<AgentTestCreateResult>(
`agent test create --api-name "${testApiName}" --target-org ${getUsername()} --json`,
{
ensureExitCode: 1,
ensureExitCode: 'nonZero',
}
);
});
Expand Down
Loading