Skip to content

Commit

Permalink
test(core): Replace gulp with direct require
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinerer committed Sep 14, 2024
1 parent 3a6f7a8 commit 38b9268
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/core/__tests__/build.comm.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ const {
readManifest
} = require('../build/comm')

jest.mock('gulp', () => ({
src: jest.fn(),
dest: jest.fn(),
lastRun: jest.fn(),
series: jest.fn(),
parallel: jest.fn(),
watch: jest.fn(),
task: jest.fn(),
}))

jest.mock('@pipflow/utils', () => ({
gulp: {
lastRun: jest.fn(),
dest: jest.fn()
},
isPlainObject: arg => Object.prototype.toString.call(arg) === '[object Object]',
readJsonFilesSync: jest.fn().mockReturnValueOnce({ '1.js': 'abc.js' })
}))
Expand Down

0 comments on commit 38b9268

Please sign in to comment.