Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Must be one of the following:
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **revert**: Used when reverting a committed change
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)
- **test**: Addition of or updates to Jest tests
- **test**: Addition of or updates to Rstest tests

#### Scope

Expand Down
2 changes: 1 addition & 1 deletion rstest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { defineConfig } from "@rstest/core";
export default defineConfig({
testEnvironment: "node",
globals: true,
testTimeout: 20000,
Comment thread
chenjiahan marked this conversation as resolved.
include: ["test/**/*.test.js"],
exclude: ["**/node_modules/**", "**/dist/**", "**/__snapshots__/**"],
setupFiles: ["./setupTest.js"],
globalSetup: ["./scripts/globalSetup.mjs"],
Comment thread
chenjiahan marked this conversation as resolved.
});
79 changes: 0 additions & 79 deletions setupTest.js

This file was deleted.

8 changes: 4 additions & 4 deletions test/helpers/listenAndCompile.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
export default (app, compiler, done) => {
export default (app, compiler, callback) => {
let complete = 0;
// wait until the app is listening and the done hook is called
// wait until the app is listening and the compiler done hook is called
const progress = () => {
complete += 1;
if (complete === 2) {
done();
callback();
}
};

const listen = app.listen((error) => {
if (error) {
// if there is an error, don't wait for the compilation to finish
return done(error);
return callback(error);
}

return progress();
Expand Down
Loading