test(nx-dev): make test pass on windows (#27284)
## Current Behavior running `nx test nx-dev-ui-markdoc` fails on windows ## Expected Behavior running `nx test nx-dev-ui-markdoc` pass on windows
This commit is contained in:
parent
bd7a2c9214
commit
45fa90f197
@ -1,4 +1,5 @@
|
|||||||
import { transformImagePath } from './transform-image-path';
|
import { transformImagePath } from './transform-image-path';
|
||||||
|
import { join, sep } from 'path';
|
||||||
|
|
||||||
describe('transformImagePath', () => {
|
describe('transformImagePath', () => {
|
||||||
it('should transform relative paths', () => {
|
it('should transform relative paths', () => {
|
||||||
@ -7,10 +8,14 @@ describe('transformImagePath', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(transform('./test.png')).toEqual(
|
expect(transform('./test.png')).toEqual(
|
||||||
'/documentation/shared/using-nx/test.png'
|
sep + join('documentation', 'shared', 'using-nx', 'test.png')
|
||||||
|
);
|
||||||
|
expect(transform('../test.png')).toEqual(
|
||||||
|
sep + join('documentation', 'shared', 'test.png')
|
||||||
|
);
|
||||||
|
expect(transform('../../test.png')).toEqual(
|
||||||
|
sep + join('documentation', 'test.png')
|
||||||
);
|
);
|
||||||
expect(transform('../test.png')).toEqual('/documentation/shared/test.png');
|
|
||||||
expect(transform('../../test.png')).toEqual('/documentation/test.png');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should transform absolute paths', () => {
|
it('should transform absolute paths', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user