Skip to content

Commit 3bcc720

Browse files
committed
fix copying file in e2e test
destination needs to exist before it’s overwritten???
1 parent 138d1e0 commit 3bcc720

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/e2e/e2e_spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ describe('webpack preprocessor - e2e', () => {
1313
let filePath
1414

1515
beforeEach(() => {
16-
preprocessor.__reset()
17-
fs.removeSync(path.join(__dirname, '_test-output'))
18-
1916
const originalFilePath = path.join(__dirname, '..', 'fixtures', 'example_spec.js')
2017

2118
filePath = path.join(__dirname, '..', '_test-output', 'example_spec.js')
19+
20+
preprocessor.__reset()
21+
fs.removeSync(path.join(__dirname, '_test-output'))
22+
fs.outputFileSync(filePath, '')
2223
fs.copyFileSync(originalFilePath, filePath)
2324

2425
file = Object.assign(new EventEmitter(), {

0 commit comments

Comments
 (0)