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 7e8f8d3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/cli/samples/watch/bundle-error/_config.js
Expand Up @@ -16,12 +16,19 @@ module.exports = {
setTimeout(() => unlinkSync(mainFile), 300);
},
abortOnStderr(data) {
if (data.includes('[!] RollupError: Unexpected token')) {
setTimeout(() => atomicWriteFileSync(mainFile, 'export default 42;'), 500);
// trigger this when the stack trace is written
if (data.includes('at error')) {
console.log('TRIGGER WRITE FILE');
setTimeout(() => {
console.log('ACTUAL WRITE');
atomicWriteFileSync(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 7e8f8d3

Please sign in to comment.