mirror of https://github.com/lukechilds/rollup.git
Joel Denning
9 years ago
3 changed files with 33 additions and 2 deletions
@ -0,0 +1,21 @@ |
|||
var assert = require( 'assert' ); |
|||
var path = require( 'path' ); |
|||
|
|||
var mockedValue = { |
|||
val: 'A value' |
|||
}; |
|||
|
|||
module.exports = { |
|||
description: 'allows a nonexistent relative module to be configured as external', |
|||
options: { |
|||
external: [ path.join( __dirname, './nonexistent-relative-dependency.js') ] |
|||
}, |
|||
context: { |
|||
require: function() { |
|||
return mockedValue; |
|||
} |
|||
}, |
|||
exports: function () { |
|||
assert.equal( mockedValue.wasAltered, true ); |
|||
} |
|||
}; |
@ -0,0 +1,3 @@ |
|||
import relativeDep from './nonexistent-relative-dependency.js'; |
|||
|
|||
relativeDep.wasAltered = true; |
Loading…
Reference in new issue