Rich-Harris 9 years ago
parent
commit
a20fc4122f
  1. 2
      test/function/cannot-call-external-namespace/_config.js
  2. 2
      test/function/cannot-call-internal-namespace/_config.js

2
test/function/cannot-call-external-namespace/_config.js

@ -5,7 +5,7 @@ module.exports = {
description: 'errors if code calls an external namespace',
error: function ( err ) {
assert.equal( err.message, 'Cannot call a namespace (\'foo\')' );
assert.equal( err.file, path.resolve( __dirname, 'main.js' ).replace( /\//g, path.sep ) );
assert.equal( err.file.replace( /\//g, path.sep ), path.resolve( __dirname, 'main.js' ) );
assert.equal( err.pos, 28 );
assert.deepEqual( err.loc, { line: 2, column: 0 });
}

2
test/function/cannot-call-internal-namespace/_config.js

@ -5,7 +5,7 @@ module.exports = {
description: 'errors if code calls an internal namespace',
error: function ( err ) {
assert.equal( err.message, 'Cannot call a namespace (\'foo\')' );
assert.equal( err.file, path.resolve( __dirname, 'main.js' ).replace( /\//g, path.sep ) );
assert.equal( err.file.replace( /\//g, path.sep ), path.resolve( __dirname, 'main.js' ) );
assert.equal( err.pos, 33 );
assert.deepEqual( err.loc, { line: 2, column: 0 });
}

Loading…
Cancel
Save