Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
test: resolve inconsistent snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
10xLaCroixDrinker committed Mar 30, 2024
1 parent c412970 commit 692599d
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions packages/one-app-runner/__tests__/bin/one-app-runner.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,7 @@ test('--modules option is required if --module-map-url option is not given', asy
setArgv({ rootModuleName: 'frank-lloyd-root', dockerImage: 'one-app:5.0.0' });
await reloadRunner();
expect(process.exit).toHaveBeenCalledWith(1);
expect(console.error.mock.calls[2][0]).toMatchInlineSnapshot(`
"Missing dependent arguments:
--no-module-map-url -> modules"
`);
expect(console.error.mock.calls[2][0]).toContain('--no-module-map-url -> modules');
});

test('--modules option is required if --parrot-middleware option is given', async () => {
Expand All @@ -298,10 +295,7 @@ test('--modules option is required if --parrot-middleware option is given', asyn
});
await reloadRunner();
expect(process.exit).toHaveBeenCalledWith(1);
expect(console.error.mock.calls[2][0]).toMatchInlineSnapshot(`
"Missing dependent arguments:
parrot-middleware -> modules"
`);
expect(console.error.mock.calls[2][0]).toContain('parrot-middleware -> modules');
});

test('--modules option is required if --dev-endpoints option is given', async () => {
Expand All @@ -313,10 +307,7 @@ test('--modules option is required if --dev-endpoints option is given', async ()
});
await reloadRunner();
expect(process.exit).toHaveBeenCalledWith(1);
expect(console.error.mock.calls[2][0]).toMatchInlineSnapshot(`
"Missing dependent arguments:
dev-endpoints -> modules"
`);
expect(console.error.mock.calls[2][0]).toContain('dev-endpoints -> modules');
});

test('--docker-network-to-join is required if --create-docker-network option is given', async () => {
Expand All @@ -328,10 +319,7 @@ test('--docker-network-to-join is required if --create-docker-network option is
});
await reloadRunner();
expect(process.exit).toHaveBeenCalledWith(1);
expect(console.error.mock.calls[2][0]).toMatchInlineSnapshot(`
"Missing dependent arguments:
create-docker-network -> docker-network-to-join"
`);
expect(console.error.mock.calls[2][0]).toContain('create-docker-network -> docker-network-to-join');
});

test('an `envVars` key is supported within the config entry', async () => {
Expand Down

0 comments on commit 692599d

Please sign in to comment.