From 7a7c234446a13580cc8701eb36ccc7df48c279fa Mon Sep 17 00:00:00 2001 From: Mickael Jeanroy Date: Mon, 21 Aug 2017 21:18:06 +0200 Subject: [PATCH] test: migrate test for rollup ~0.48.0 --- test/integration/it.spec.js | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/test/integration/it.spec.js b/test/integration/it.spec.js index 2df301bb..7ab45ac1 100644 --- a/test/integration/it.spec.js +++ b/test/integration/it.spec.js @@ -50,9 +50,16 @@ describe('Dependency', () => { const thirdPartyOutput = path.join(tmpDir.name, 'dependencies.txt'); const rollupConfig = { + // Keep the `entry` option because of `rollup-plugin-commonjs` entry: path.join(__dirname, 'bundle.js'), - dest: bundleOutput, - format: 'es', + + input: path.join(__dirname, 'bundle.js'), + + output: { + file: bundleOutput, + format: 'es', + }, + plugins: [ nodeResolve(), commonjs(), @@ -66,7 +73,7 @@ describe('Dependency', () => { }; rollup.rollup(rollupConfig) - .then((bundle) => bundle.write(rollupConfig)) + .then((bundle) => bundle.write(rollupConfig.output)) .then(() => { fs.readFile(thirdPartyOutput, 'utf8', (err, data) => { if (err) { @@ -86,21 +93,25 @@ describe('Dependency', () => { const EOL = '\n'; const rollupConfig = { + // Keep the `entry` option because of `rollup-plugin-commonjs` entry: path.join(__dirname, 'bundle.js'), - dest: bundleOutput, - format: 'es', + + input: path.join(__dirname, 'bundle.js'), + + output: { + file: bundleOutput, + format: 'es', + }, + plugins: [ nodeResolve(), commonjs(), - - licensePlugin({ - banner, - }), + licensePlugin({banner}), ], }; rollup.rollup(rollupConfig) - .then((bundle) => bundle.write(rollupConfig)) + .then((bundle) => bundle.write(rollupConfig.output)) .then(() => { fs.readFile(bundleOutput, 'utf8', (err, data) => { if (err) {