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 9585dc4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/cli/samples/watch/no-config-file/_config.js
Expand Up @@ -4,7 +4,7 @@ module.exports = {
description: 'watches without a config file',
command: 'rollup main.js --watch --format es --file _actual/main.js',
abortOnStderr(data) {
if (data.includes(`created _actual${path.sep}main.js`)) {
if (data.includes(`created _actual/main.js`)) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/cli/samples/watch/node-config-file/_config.js
Expand Up @@ -4,7 +4,7 @@ module.exports = {
description: 'watches using a node_modules config files',
command: 'rollup --watch --config node:custom',
abortOnStderr(data) {
if (data.includes(`created _actual${path.sep}main.js`)) {
if (data.includes(`created _actual/main.js`)) {
return true;
}
}
Expand Down
3 changes: 2 additions & 1 deletion test/cli/samples/watch/watch-config-early-update/_config.js
Expand Up @@ -45,6 +45,7 @@ module.exports = {
},
after() {
unlinkSync(configFile);
stopUpdate();
},
abortOnStderr(data) {
if (data === 'initial\n') {
Expand All @@ -62,7 +63,7 @@ module.exports = {
);
return false;
}
if (data.includes(`created _actual${path.sep}output2.js`)) {
if (data.includes(`created _actual/output2.js`)) {
stopUpdate();
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions test/cli/samples/watch/watch-config-error/_config.js
Expand Up @@ -26,7 +26,7 @@ module.exports = {
setTimeout(() => unlinkSync(configFile), 300);
},
abortOnStderr(data) {
if (data.includes(`created _actual${path.sep}main1.js`)) {
if (data.includes(`created _actual/main1.js`)) {
setTimeout(
() => atomicWriteFileSync(configFile, 'throw new Error("Config contains errors");'),
600
Expand All @@ -48,7 +48,7 @@ module.exports = {
}, 600);
return false;
}
if (data.includes(`created _actual${path.sep}main2.js`)) {
if (data.includes(`created _actual/main2.js`)) {
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/cli/samples/watch/watch-config-no-update/_config.js
Expand Up @@ -23,7 +23,7 @@ module.exports = {
unlinkSync(configFile);
},
abortOnStderr(data) {
if (data.includes(`created _actual${path.sep}main.js`)) {
if (data.includes(`created _actual/main.js`)) {
atomicWriteFileSync(configFile, configContent);
// wait some time for the watcher to trigger
return new Promise(resolve => setTimeout(() => resolve(true), 600));
Expand Down

0 comments on commit 9585dc4

Please sign in to comment.