Skip to content

Commit 070bae3

Browse files
trying to fix path normalization thing
1 parent f9895df commit 070bae3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/compiler/output-targets/test/output-lazy-loader.spec.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type * as d from '@stencil/core/declarations';
22
import { mockBuildCtx, mockCompilerCtx, mockCompilerSystem, mockValidatedConfig } from '@stencil/core/testing';
3-
import { DIST, normalizePath } from '@utils';
3+
import { DIST, normalize } from '@utils';
44

55
import { validateDist } from '../../config/outputs/validate-dist';
66
import { outputLazyLoader } from '../output-lazy-loader';
@@ -46,28 +46,28 @@ describe('Lazy Loader Output Target', () => {
4646

4747
const expectedIndexOutput = `export * from '../esm/polyfills/index.js';
4848
export * from '../esm-es5/loader.js';`;
49-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.js'), expectedIndexOutput);
49+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.js'), expectedIndexOutput);
5050

5151
const expectCjsIndexOutput = `module.exports = require('../cjs/loader.cjs.js');
5252
module.exports.applyPolyfills = function() { return Promise.resolve() };`;
53-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.cjs.js'), expectCjsIndexOutput);
53+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.cjs.js'), expectCjsIndexOutput);
5454

5555
const expectes2017Output = `export * from '../esm/polyfills/index.js';
5656
export * from '../esm/loader.js';`;
57-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.es2017.js'), expectes2017Output);
57+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.es2017.js'), expectes2017Output);
5858
});
5959

6060
it('should exclude polyfill code when buildEs5=false', async () => {
6161
({ config, compilerCtx, writeFileSpy } = setup({ buildEs5: false }));
6262
await outputLazyLoader(config, compilerCtx);
6363

6464
const expectedIndexOutput = `export * from '../esm/loader.js';`;
65-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.js'), expectedIndexOutput);
65+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.js'), expectedIndexOutput);
6666

6767
const expectCjsIndexOutput = `module.exports = require('../cjs/loader.cjs.js');`;
68-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.cjs.js'), expectCjsIndexOutput);
68+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.cjs.js'), expectCjsIndexOutput);
6969

7070
const expectes2017Output = `export * from '../esm/loader.js';`;
71-
expect(writeFileSpy).toHaveBeenCalledWith(normalizePath('/my-test-dir/loader/index.es2017.js'), expectes2017Output);
71+
expect(writeFileSpy).toHaveBeenCalledWith(normalize('/my-test-dir/loader/index.es2017.js'), expectes2017Output);
7272
});
7373
});

0 commit comments

Comments
 (0)