Skip to content

Commit b25613f

Browse files
committed
test that source maps are enabled when --debug argument is passed
1 parent 853b39e commit b25613f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

__tests__/commands.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ describe('serve:electron', () => {
254254
expect(rendererConfig.node.test).toBe('expected')
255255
})
256256

257-
test('If --debug argument is passed, electron is not launched and main process is not minified', async () => {
257+
test('If --debug argument is passed, electron is not launched, main process is not minified, and source maps are enabled', async () => {
258258
await runCommand('serve:electron', {}, { debug: true })
259259
const mainConfig = webpack.mock.calls[0][0]
260260

@@ -264,6 +264,8 @@ describe('serve:electron', () => {
264264
p => p.__pluginConstructorName === 'UglifyJsPlugin'
265265
)
266266
).toBeUndefined()
267+
// Source maps are enabled
268+
expect(mainConfig.devtool).toBe('source-map')
267269
// Electron is not launched
268270
expect(execa).not.toBeCalled()
269271
})

0 commit comments

Comments
 (0)