Skip to content

Commit

Permalink
trying to make this test work cross platform
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Aug 15, 2022
1 parent 6bac2dc commit 3f0fad2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/bundle/test/ext-transforms-plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { stubComponentCompilerMeta } from '../../types/tests/ComponentCompilerMe
import { BundleOptions } from '../bundle-interface';
import { extTransformsPlugin } from '../ext-transforms-plugin';
import * as importPathLib from '../../transformers/stencil-import-path';
import { normalizePath } from '@utils';

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

expect(writeFileSpy).toBeCalledWith('dist/collectionDir/foo.css', ':host { text: pink; }');
const [path, css] = writeFileSpy.mock.calls[0];

expect(normalizePath(path)).toBe('./dist/collectionDir/foo.css');

expect(css).toBe(':host { text: pink; }');
});

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

0 comments on commit 3f0fad2

Please sign in to comment.