Skip to content

Commit 3f0fad2

Browse files
trying to make this test work cross platform
1 parent 6bac2dc commit 3f0fad2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/compiler/bundle/test/ext-transforms-plugin.spec.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { stubComponentCompilerMeta } from '../../types/tests/ComponentCompilerMe
33
import { BundleOptions } from '../bundle-interface';
44
import { extTransformsPlugin } from '../ext-transforms-plugin';
55
import * as importPathLib from '../../transformers/stencil-import-path';
6+
import { normalizePath } from '@utils';
67

78
describe('extTransformsPlugin', () => {
89
function setup(bundleOptsOverrides: Partial<BundleOptions> = {}) {
@@ -93,7 +94,11 @@ describe('extTransformsPlugin', () => {
9394
// @ts-ignore the Rollup plugins expect to be called in a Rollup context
9495
await plugin.transform('asdf', '/some/stubbed/path/foo.css?tag=my-component');
9596

96-
expect(writeFileSpy).toBeCalledWith('dist/collectionDir/foo.css', ':host { text: pink; }');
97+
const [path, css] = writeFileSpy.mock.calls[0];
98+
99+
expect(normalizePath(path)).toBe('./dist/collectionDir/foo.css');
100+
101+
expect(css).toBe(':host { text: pink; }');
97102
});
98103

99104
describe('passing `commentOriginalSelector` to `transformCssToEsm`', () => {

0 commit comments

Comments
 (0)