-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.ts
More file actions
22 lines (18 loc) · 721 Bytes
/
index.ts
File metadata and controls
22 lines (18 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { describe, it } from 'mocha';
import getWebpackCompiler from './utils/get-webpack-compiler';
import compile from './utils/compile';
import getModuleSource from './utils/get-module-source';
import { expect } from 'earl';
([
['stylex-webpack (webpack)', getWebpackCompiler]
// ['forgetti-loader (rspack)', getRspackCompiler]
] as const).forEach(([name, getCompiler]) => {
describe(name, () => {
it('should work', async function () {
const [compiler, fs] = getCompiler('./simple.js');
const stats = await compile(compiler);
// const { chunks, modules } = stats.toJson({ source: true });
expect(getModuleSource('./simple.js', stats, fs)).toMatchSnapshot(this);
});
});
});