Skip to content

Commit

Permalink
ci: hack around executable name change
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwremmel committed Jan 25, 2024
1 parent e9b5c52 commit 9cc9fda
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/cli.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import assert from 'node:assert';

import {cli} from './cli';

/* eslint-disable @typescript-eslint/no-empty-function */
Expand All @@ -18,6 +20,17 @@ beforeEach(() => {

it('prints help and exits', () => {
cli(['', '']);
// This is a hack to deal with CI having a differing executable name for some.
// CI used to work just fine (a main branch build fully passed tests), but now
// an unchanged branch off of main using a different process name.
stderr.mock.calls.forEach((call) => {
assert(Array.isArray(call));
call.forEach((c, index) => {
assert(typeof c === 'string');
call[index] = c.replace(/processChild.js/g, 'jest');
});
});

expect(stdout.mock.calls).toMatchInlineSnapshot(`[]`);
expect(stderr.mock.calls).toMatchInlineSnapshot(`
[
Expand Down

0 comments on commit 9cc9fda

Please sign in to comment.