Skip to content

Commit

Permalink
test: migrate test for rollup ~0.48.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mjeanroy committed Aug 21, 2017
1 parent cf73fb0 commit 7a7c234
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions test/integration/it.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 7a7c234

Please sign in to comment.