Browse Source

test for module importing itself

better-aggressive
Rich Harris 9 years ago
parent
commit
4faa4ea298
  1. 8
      test/function/cannot-import-self/_config.js
  2. 1
      test/function/cannot-import-self/main.js

8
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 ) );
}
};

1
test/function/cannot-import-self/main.js

@ -0,0 +1 @@
import me from './main';
Loading…
Cancel
Save