Skip to content

Commit

Permalink
Jest 26 (#1754)
Browse files Browse the repository at this point in the history
* Use jest 26

* (tests) define can't be async

* require.requireActual -> jest.requireActual
  • Loading branch information
MatthijsBurgh authored May 26, 2022
1 parent 2659286 commit 5798201
Show file tree
Hide file tree
Showing 4 changed files with 1,382 additions and 24 deletions.
4 changes: 2 additions & 2 deletions __mocks__/webpack.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DefinePlugin = require.requireActual('webpack').DefinePlugin
const EnvironmentPlugin = require.requireActual('webpack').EnvironmentPlugin
const DefinePlugin = jest.requireActual('webpack').DefinePlugin
const EnvironmentPlugin = jest.requireActual('webpack').EnvironmentPlugin
// Mock webpack function
const webpack = jest.genMockFromModule('webpack')
// Use unmocked plugins plugins are real
Expand Down
2 changes: 1 addition & 1 deletion __tests__/commands.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ describe('Custom webpack chain', () => {
})
})

describe('testWithSpectron', async () => {
describe('testWithSpectron', () => {
// Mock portfinder's returned port
portfinder.getPortPromise = jest.fn().mockResolvedValue('expectedPort')

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"jest": "^24.8.0",
"jest": "^26.0.0",
"lnk": "^1.1.0",
"rimraf": "^3.0.0",
"spectron": "^15.0.0",
Expand Down
Loading

0 comments on commit 5798201

Please sign in to comment.