Skip to content

Commit

Permalink
fix: remove port from snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Sep 30, 2024
1 parent 26fd287 commit c8ef956
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ exports[`nx-verdaccio plugin create-nodes-v2 > should add environment targets to
"clear": true,
"config": ".verdaccio/config.yml",
"environmentDir": "tmp/environments/my-lib-e2e",
"port": 6125,
"port": Any<Number>,
"projectName": "my-lib-e2e",
"storage": "tmp/environments/my-lib-e2e/storage",
},
Expand Down
11 changes: 10 additions & 1 deletion e2e/nx-verdaccio-e2e/test/plugin-create-nodes.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,16 @@ describe('nx-verdaccio plugin create-nodes-v2', () => {
})
);

expect(projectJson.targets).toMatchSnapshot();
expect({
...projectJson.targets,
['nxv-env-verdaccio-start']: {
...projectJson.targets['nxv-env-verdaccio-start'],
options: {
...projectJson.targets['nxv-env-verdaccio-start'].options,
port: expect.any(Number),
},
},
}).toMatchSnapshot();
});
it('should NOT add environment targets to project without targetName e2e', async () => {
const cwd = join(baseDir, 'no-env-targets');
Expand Down

0 comments on commit c8ef956

Please sign in to comment.