Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
395f366
commit 1e59438
Showing
18 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { assertStderrIncludes } = require('../../../utils.js'); | ||
|
||
module.exports = { | ||
description: 'throws if different types of entries are combined', | ||
command: 'rollup main.js --format es --input main.js', | ||
error: () => true, | ||
stderr(stderr) { | ||
assertStderrIncludes(stderr, '[!] Either use --input, or pass input path as argument'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
assert.equal( 1 + 1, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'populates options.external with --global keys', | ||
command: 'rollup main.js --format iife --globals mathematics:Math', | ||
execute: true | ||
command: | ||
'rollup main.js --format iife --globals mathematics:Math,promises:Promise --external promises', | ||
execute: true, | ||
stderr(stderr) { | ||
assert.strictEqual(stderr.indexOf('(!)'), -1); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import { max } from 'mathematics'; | ||
import { resolve } from 'promises'; | ||
|
||
assert.equal( max( 1, 2, 3 ), 3 ); | ||
assert.ok( resolve().then ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
const assert = require('assert'); | ||
|
||
module.exports = { | ||
description: 'allows external modules to be specified with --external=foo,bar,baz', | ||
command: 'rollup main.js --format cjs --external path,util', | ||
execute: true | ||
command: 'rollup main.js --format cjs --external=path,util', | ||
execute: true, | ||
stderr(stderr) { | ||
assert.strictEqual(stderr.indexOf('(!)'), -1); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
description: 'uses config file installed from npm', | ||
description: 'uses config file installed from npm, automatically adding a rollup-config- prefix', | ||
command: 'rollup --config node:foo', | ||
execute: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { assertStderrIncludes } = require('../../../utils.js'); | ||
|
||
module.exports = { | ||
description: 'throws if a config in node_modules cannot be found', | ||
command: 'rollup --config node:baz', | ||
error: () => true, | ||
stderr(stderr) { | ||
assertStderrIncludes(stderr, '[!] Could not resolve config file node:baz'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
global.myBundle = factory(); | ||
}(this, function () { 'use strict'; | ||
|
||
var main = 42; | ||
|
||
return main; | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
assert.equal( ANSWER, 42 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
description: 'uses config file installed from npm', | ||
command: 'rollup --config node:foo', | ||
command: 'rollup --config node:bar', | ||
cwd: __dirname, | ||
execute: true | ||
}; |