Skip to content

Commit 38b9268

Browse files
committed
test(core): Replace gulp with direct require
1 parent 3a6f7a8 commit 38b9268

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/core/__tests__/build.comm.test.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ const {
99
readManifest
1010
} = require('../build/comm')
1111

12+
jest.mock('gulp', () => ({
13+
src: jest.fn(),
14+
dest: jest.fn(),
15+
lastRun: jest.fn(),
16+
series: jest.fn(),
17+
parallel: jest.fn(),
18+
watch: jest.fn(),
19+
task: jest.fn(),
20+
}))
21+
1222
jest.mock('@pipflow/utils', () => ({
13-
gulp: {
14-
lastRun: jest.fn(),
15-
dest: jest.fn()
16-
},
1723
isPlainObject: arg => Object.prototype.toString.call(arg) === '[object Object]',
1824
readJsonFilesSync: jest.fn().mockReturnValueOnce({ '1.js': 'abc.js' })
1925
}))

0 commit comments

Comments
 (0)