Skip to content

Commit

Permalink
Test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Mar 2, 2022
1 parent b107be0 commit 69cfd44
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/cli/samples/watch/watch-config-early-update/_config.js
Expand Up @@ -6,6 +6,7 @@ const configFile = path.join(__dirname, 'rollup.config.js');
let stopUpdate;

module.exports = {
solo: true,
description: 'immediately reloads the config file if a change happens while it is parsed',
command: 'rollup -cw',
before() {
Expand Down Expand Up @@ -45,9 +46,13 @@ module.exports = {
},
after() {
unlinkSync(configFile);
stopUpdate();
console.error('STOPPED after');
},
abortOnStderr(data) {
console.error('DATA:', JSON.stringify(data));
if (data === 'initial\n') {
console.error('start retry');
stopUpdate = writeAndRetry(
configFile,
`
Expand All @@ -62,7 +67,12 @@ module.exports = {
);
return false;
}
console.error(
`checking for: created _actual${path.sep}output2.js`,
data.includes(`created _actual${path.sep}output2.js`)
);
if (data.includes(`created _actual${path.sep}output2.js`)) {
console.error('STOP update');
stopUpdate();
return true;
}
Expand Down

0 comments on commit 69cfd44

Please sign in to comment.