Skip to content

Commit

Permalink
fix windows unit-tests 2
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed Oct 22, 2024
1 parent efc13d4 commit fecdb76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ describe('runNpmInstallExecutor', () => {

expect(logger.info).toHaveBeenCalledTimes(1);
expect(logger.info).toHaveBeenCalledWith(
`Installing [email protected] in ${join(
DEFAULT_ENVIRONMENTS_OUTPUT_DIR,
'my-lib-e2e'
)}`
expect.stringContaining(`Installing [email protected] in`)
);

expect(executeProcessSpy).toHaveBeenCalledTimes(1);
Expand All @@ -89,7 +86,7 @@ describe('runNpmInstallExecutor', () => {
'--no-shrinkwrap',
'--save',
],
cwd: 'tmp/environments/my-lib-e2e',
cwd: expect.toMatchPath('tmp/environments/my-lib-e2e'),
verbose: true,
})
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, vi, it } from 'vitest';
import runNpmPublishExecutor from './executor';
import {MEMFS_VOLUME, osAgnosticPath} from '@push-based/test-utils';
import { MEMFS_VOLUME, osAgnosticPath } from '@push-based/test-utils';
import * as execProcessModule from '../../internal/execute-process';
import * as pkgVersionModule from './pkg-version';
import { logger } from '@nx/devkit';
Expand Down Expand Up @@ -67,11 +67,15 @@ describe('runNpmPublishExecutor', () => {
const envRoot = 'tmp/environments/my-lib-e2e';

expect(logger.info).toHaveBeenCalledWith(
expect.stringContaining(`Publishing package from ${pkgDist} to ${envRoot} with userconfig`)
expect.stringContaining(
`Publishing package from ${pkgDist} to ${envRoot} with userconfig`
)
);

expect(pkgVersionModuleSpy).toHaveBeenCalledTimes(1);
expect(pkgVersionModuleSpy).toHaveBeenCalledWith(expect.toMatchPath('dist/projects/my-lib'));
expect(pkgVersionModuleSpy).toHaveBeenCalledWith(
expect.toMatchPath('dist/projects/my-lib')
);

expect(executeProcessSpy).toHaveBeenCalledTimes(1);
expect(executeProcessSpy).toHaveBeenCalledWith(
Expand Down

0 comments on commit fecdb76

Please sign in to comment.