Skip to content

Commit

Permalink
add test for #1274
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jun 3, 2017
1 parent 694d16e commit 98f804a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/function/cannot-import-self-empty/_config.js
@@ -0,0 +1,20 @@
var path = require( 'path' );
var assert = require( 'assert' );

module.exports = {
description: 'prevents a module importing itself',
error: {
code: 'CANNOT_IMPORT_SELF',
message: `A module cannot import itself`,
pos: 0,
loc: {
file: path.resolve( __dirname, 'main.js' ),
line: 1,
column: 0
},
frame: `
1: import './main';
^
`
}
};
1 change: 1 addition & 0 deletions test/function/cannot-import-self-empty/main.js
@@ -0,0 +1 @@
import './main';

0 comments on commit 98f804a

Please sign in to comment.