Browse Source

Test for not resolved module

semi-dynamic-namespace-imports
Bogdan Chadkin 9 years ago
parent
commit
8bca62b559
  1. 10
      test/function/throws-not-found-module/_config.js
  2. 1
      test/function/throws-not-found-module/main.js

10
test/function/throws-not-found-module/_config.js

@ -0,0 +1,10 @@
var assert = require( 'assert' );
var path = require( 'path' );
module.exports = {
solo: true,
description: 'throws error if module is not found',
error: function ( err ) {
assert.equal( err.message, 'Could not resolve ./mod from ' + path.resolve( __dirname, 'main.js' ) );
}
};

1
test/function/throws-not-found-module/main.js

@ -0,0 +1 @@
import './mod';
Loading…
Cancel
Save