Skip to content

Commit f886519

Browse files
committed
since electron's webutils class is now used in storyboard files, we have to mock it when running build-storybook, this fixes the failing chromatic test
1 parent 52729b9 commit f886519

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
WebUtils: () => 'mockedFile'
3+
}

packages/desktop/.storybook/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ module.exports = {
3636
...config.resolve.alias,
3737
fs: path.resolve(__dirname, 'fsMock.js'),
3838
'electron-store-webpack-wrapper': path.resolve(__dirname, 'electronStoreMock.js'),
39-
net: path.resolve(__dirname, 'netMock.js')
39+
net: path.resolve(__dirname, 'netMock.js'),
40+
electron: path.resolve(__dirname, 'electronMock.js'),
4041
};
4142
config.module.rules.push({
4243
test: /\.scss$/,

0 commit comments

Comments
 (0)