Skip to content

Commit

Permalink
Replace mocha with jest (#470)
Browse files Browse the repository at this point in the history
* Replace mocha with jest

* Remove unnecessary @babel/register

* Move chai setup to each test file

This allows us moving to Jest built-in matchers one test file at a time

* Remove xvfb from github workflow

* Move timeout configuration to describe block

* Use spawn instead of exec
  • Loading branch information
valscion committed Oct 7, 2021
1 parent c93fd2b commit 8dce252
Show file tree
Hide file tree
Showing 14 changed files with 2,360 additions and 519 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Expand Up @@ -29,10 +29,8 @@ jobs:
- name: Build sources
run: npm run build

- name: Run tests with xvfb available
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test
- name: Run tests
run: npm run test

lint:
runs-on: ubuntu-latest
Expand Down
20 changes: 20 additions & 0 deletions jest.config.js
@@ -0,0 +1,20 @@
// Jest configuration
// Reference: https://jestjs.io/docs/configuration

module.exports = {
testMatch: [
'**/test/*.js'
],
testPathIgnorePatterns: [
'<rootDir>/test/helpers.js'
],
setupFilesAfterEnv: [
'<rootDir>/test/helpers.js'
],
watchPathIgnorePatterns: [
// Ignore the output generated by plugin tests
// when watching for changes to avoid the test
// runner continuously re-running tests
'<rootDir>/test/output'
]
};

0 comments on commit 8dce252

Please sign in to comment.