Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
test for #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Nov 28, 2015
1 parent b15d1e2 commit 110a2c1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/samples/checks/foo/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": [ "es2015" ]
}
1 change: 1 addition & 0 deletions test/samples/checks/foo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default 42;
3 changes: 3 additions & 0 deletions test/samples/checks/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import foo from './foo/index.js';

console.log( foo );
13 changes: 13 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,17 @@ describe( 'rollup-plugin-babel', function () {
});
});
});

it( 'checks config per-file', function () {
return rollup.rollup({
entry: 'samples/checks/main.js',
plugins: [ babelPlugin() ]
})
.then( function () {
assert.ok( false, 'promise should not fulfil' );
})
.catch( function ( err ) {
assert.ok( /es2015-rollup/.test( err.message ) );
});
});
});

0 comments on commit 110a2c1

Please sign in to comment.