Skip to content

Commit

Permalink
fix: update expected test output
Browse files Browse the repository at this point in the history
Previously triggering an "UnhandledPromiseRejectionWarning" when stderr output didn't match, test execution stopped but exited with code 0.
  • Loading branch information
novalex committed Jun 25, 2024
1 parent 872b9fd commit 0875551
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/system/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,15 @@ describe('`snyk-api-import sync <...>`', () => {
},
},
async (err, stdout, stderr) => {
expect(stderr).toEqual('');
expect(stderr).toEqual(
`Failed to sync target api-import-circle-test/deleted-repo. ERROR: Cannot read properties of undefined (reading 'branch')\n`,
);
expect(err).toBeNull();
expect(stdout).toMatch(
'Done syncing targets for source github-enterprise',
);
expect(stdout).toMatch('Processed 3 targets (0 failed)');
expect(stdout).toMatch('Updated 2 projects');
expect(stdout).toMatch('Processed 4 targets (1 failed)');
expect(stdout).toMatch('Updated 6 projects');

// give file a little time to be finished to be written
await new Promise((r) => setTimeout(r, 20000));
Expand Down

0 comments on commit 0875551

Please sign in to comment.