Skip to content

Commit

Permalink
test: try some change
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Dec 16, 2022
1 parent a98df37 commit 30b8c9f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/cli/samples/watch/bundle-error/_config.js
@@ -1,6 +1,6 @@
const { unlinkSync, writeFileSync } = require('node:fs');
const path = require('node:path');
const { atomicWriteFileSync } = require('../../../../utils');
const { writeAndSync } = require('../../../../utils');

let mainFile;

Expand All @@ -17,11 +17,14 @@ module.exports = {
},
abortOnStderr(data) {
if (data.includes('[!] RollupError: Unexpected token')) {
setTimeout(() => atomicWriteFileSync(mainFile, 'export default 42;'), 500);
console.log('TRIGGER WRITE FILE');
setTimeout(() => writeAndSync(mainFile, 'export default 42;'), 500);
return false;
}
if (data.includes('created _actual')) {
} else if (data.includes('created _actual')) {
console.log('DONE');
return true;
} else {
console.log('NO TRIGGER:', data);
}
}
};

0 comments on commit 30b8c9f

Please sign in to comment.