Skip to content

Commit fc28271

Browse files
committed
Mock process.exit to allow tests to finish correctly
1 parent 4be28d9 commit fc28271

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/deploy.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// mock config for testing
33
jest.mock('../src/config', () => require('./__mocks__/config'));
44

5+
// mock process.exit for testing
6+
jest.spyOn(process, 'exit').mockImplementation(() => {});
7+
58
// npm packages
69
const fs = require('fs');
710
const path = require('path');

0 commit comments

Comments
 (0)