diff --git a/test/function/cannot-import-self/_config.js b/test/function/cannot-import-self/_config.js new file mode 100644 index 0000000..2413d03 --- /dev/null +++ b/test/function/cannot-import-self/_config.js @@ -0,0 +1,8 @@ +var assert = require( 'assert' ); + +module.exports = { + description: 'prevents a module importing itself', + error: function ( err ) { + assert.ok( /A module cannot import itself/.test( err.message ) ); + } +}; diff --git a/test/function/cannot-import-self/main.js b/test/function/cannot-import-self/main.js new file mode 100644 index 0000000..48e08e6 --- /dev/null +++ b/test/function/cannot-import-self/main.js @@ -0,0 +1 @@ +import me from './main';