Skip to content

Commit 3f9053c

Browse files
committed
test: use single file tests as jest entries
1 parent 7830da5 commit 3f9053c

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

.github/workflows/get-runner-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
LINUX_RUNNER_LABELS='"ubuntu-22.04"';
4343
fi
4444
if [[ -z "$MACOS_RUNNER_LABELS" ]]; then
45-
MACOS_RUNNER_LABELS='"macos-latest"';
45+
MACOS_RUNNER_LABELS='"rspack-darwin-14-medium"';
4646
fi
4747
if [[ -z "$WINDOWS_RUNNER_LABELS" ]]; then
4848
WINDOWS_RUNNER_LABELS='"windows-latest"';

packages/rspack-test-tools/src/runner/node/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ export class NodeRunner<T extends ECompilerType = ECompilerType.Rspack>
174174
Symbol,
175175
Buffer,
176176
setImmediate,
177+
__SOURCE__: this._options.source,
178+
__DIST__: this._options.dist,
177179
__MODE__: this._options.compilerOptions.mode,
178180
__SNAPSHOT__: path.join(this._options.source, "__snapshot__"),
179181
...this._options.env

tests/rspack-test/compilerCases/invalidation-multi-times.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defineCompileCase(Utils.basename(__filename), {
3535
compiler.watching.invalidateWithChangesAndRemovals(new Set([path.resolve(__dirname, "../fixtures/b.js")]));
3636
setTimeout(() => {
3737
resolve();
38-
}, 500)
38+
}, 2000)
3939
}
4040
});
4141
});

tests/rspack-test/normalCases/esm/import-meta-property/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { pathToFileURL } = require("url");
22
const url = pathToFileURL(
3-
require("path").resolve("./normalCases/esm/import-meta-property/index.js")
3+
require("path").resolve(__SOURCE__, "./index.js")
44
).toString();
55
it("import.meta.url.xxx", () => {
66
expect(typeof import.meta.url.length).toBe("number");

tests/rspack-test/normalCases/esm/import-meta/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
const { pathToFileURL } = require("url");
22
const url = pathToFileURL(
33
/// DIFF
4-
// require("path").resolve("./test/cases/esm/import-meta/index.js")
5-
require("path").resolve("./normalCases/esm/import-meta/index.js")
4+
require("path").resolve(__SOURCE__, "./index.js")
65
).toString();
76
const webpackVersion = parseInt(
87
/// DIFF

0 commit comments

Comments
 (0)