Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add a watch option
  • Loading branch information
Rich-Harris committed Jun 3, 2017
1 parent 48f3e82 commit bd2b15f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/rollup.js
Expand Up @@ -39,7 +39,8 @@ const ALLOWED_KEYS = [
'sourceMapFile',
'targets',
'treeshake',
'useStrict'
'useStrict',
'watch'
];

function checkOptions ( options ) {
Expand Down
6 changes: 6 additions & 0 deletions test/function/watch-option/_config.js
@@ -0,0 +1,6 @@
module.exports = {
description: 'expects watch option',
options: {
watch: {}
}
};
1 change: 1 addition & 0 deletions test/function/watch-option/main.js
@@ -0,0 +1 @@
assert.ok(true);
2 changes: 1 addition & 1 deletion test/test.js
Expand Up @@ -132,7 +132,7 @@ describe( 'rollup', function () {
return rollup.rollup({ entry: 'x', plUgins: [] }).then( () => {
throw new Error( 'Missing expected error' );
}, err => {
assert.equal( err.message, 'Unexpected key \'plUgins\' found, expected one of: acorn, amd, banner, cache, context, dest, entry, exports, external, footer, format, globals, indent, interop, intro, legacy, moduleContext, moduleName, noConflict, onwarn, outro, paths, plugins, preferConst, sourceMap, sourceMapFile, targets, treeshake, useStrict' );
assert.equal( err.message, 'Unexpected key \'plUgins\' found, expected one of: acorn, amd, banner, cache, context, dest, entry, exports, external, footer, format, globals, indent, interop, intro, legacy, moduleContext, moduleName, noConflict, onwarn, outro, paths, plugins, preferConst, sourceMap, sourceMapFile, targets, treeshake, useStrict, watch' );
});
});

Expand Down

0 comments on commit bd2b15f

Please sign in to comment.