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 1e647a2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/cli/samples/watch/no-config-file/_config.js
@@ -1,6 +1,7 @@
const path = require('path');

module.exports = {
solo: true,
description: 'watches without a config file',
command: 'rollup main.js --watch --format es --file _actual/main.js',
abortOnStderr(data) {
Expand Down
1 change: 1 addition & 0 deletions test/cli/samples/watch/node-config-file/_config.js
@@ -1,6 +1,7 @@
const path = require('path');

module.exports = {
solo: true,
description: 'watches using a node_modules config files',
command: 'rollup --watch --config node:custom',
abortOnStderr(data) {
Expand Down
5 changes: 4 additions & 1 deletion 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,8 +46,10 @@ module.exports = {
},
after() {
unlinkSync(configFile);
stopUpdate();
},
abortOnStderr(data) {
console.error('DATA:', JSON.stringify(data));
if (data === 'initial\n') {
stopUpdate = writeAndRetry(
configFile,
Expand All @@ -62,7 +65,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
1 change: 1 addition & 0 deletions test/cli/samples/watch/watch-config-error/_config.js
Expand Up @@ -5,6 +5,7 @@ const { atomicWriteFileSync } = require('../../../../utils');
let configFile;

module.exports = {
solo: true,
description: 'keeps watching the config file in case the config is changed to an invalid state',
command: 'rollup -cw',
before() {
Expand Down
Expand Up @@ -5,6 +5,7 @@ const { atomicWriteFileSync } = require('../../../../utils');
let configFile;

module.exports = {
solo: true,
description: 'keeps watching the config file in case the initial file contains an error',
command: 'rollup -cw',
before() {
Expand Down
1 change: 1 addition & 0 deletions test/cli/samples/watch/watch-config-no-update/_config.js
Expand Up @@ -13,6 +13,7 @@ const configContent =
'};';

module.exports = {
solo: true,
description: 'does not rebuild if the config file is updated without change',
command: 'rollup -cw',
before() {
Expand Down

0 comments on commit 1e647a2

Please sign in to comment.