We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b251762 commit 287772bCopy full SHA for 287772b
__tests__/webpackConfig.spec.js
@@ -2,7 +2,7 @@ const { chainWebpack } = require('../lib/webpackConfig')
2
const Config = require('webpack-chain')
3
const webpack = require('webpack')
4
const fs = require('fs')
5
-
+jest.mock('fs')
6
// Set for Electron builds
7
process.env.IS_ELECTRON = true
8
@@ -86,7 +86,7 @@ describe('chainWebpack', () => {
86
dependencies: { mockExternal: 'mockExternal' }
87
}))
88
const { readFileSync: realReadFileSync } = fs
89
- fs.readFileSync = jest.fn((path, ...args) => {
+ fs.readFileSync.mockImplementationOnce((path, ...args) => {
90
if (path === 'mockExternalPath') {
91
return JSON.stringify({})
92
}
0 commit comments