Skip to content

Commit db74d85

Browse files
authored
refactor(test): remove jest-specific setup file (#19)
1 parent 651ef41 commit db74d85

9 files changed

Lines changed: 323 additions & 443 deletions

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Must be one of the following:
9595
- **refactor**: A code change that neither fixes a bug nor adds a feature
9696
- **revert**: Used when reverting a committed change
9797
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
98-
- **test**: Addition of or updates to Jest tests
98+
- **test**: Addition of or updates to Rstest tests
9999

100100
#### Scope
101101

rstest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { defineConfig } from "@rstest/core";
33
export default defineConfig({
44
testEnvironment: "node",
55
globals: true,
6+
testTimeout: 20000,
67
include: ["test/**/*.test.js"],
78
exclude: ["**/node_modules/**", "**/dist/**", "**/__snapshots__/**"],
8-
setupFiles: ["./setupTest.js"],
99
globalSetup: ["./scripts/globalSetup.mjs"],
1010
});

setupTest.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

test/helpers/listenAndCompile.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
export default (app, compiler, done) => {
1+
export default (app, compiler, callback) => {
22
let complete = 0;
3-
// wait until the app is listening and the done hook is called
3+
// wait until the app is listening and the compiler done hook is called
44
const progress = () => {
55
complete += 1;
66
if (complete === 2) {
7-
done();
7+
callback();
88
}
99
};
1010

1111
const listen = app.listen((error) => {
1212
if (error) {
1313
// if there is an error, don't wait for the compilation to finish
14-
return done(error);
14+
return callback(error);
1515
}
1616

1717
return progress();

0 commit comments

Comments
 (0)