From 61a89445987df3c64610b0687875840c1dc647eb Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Wed, 4 Nov 2015 11:15:35 -0800 Subject: [PATCH] Add failing test case. --- test/function/assignment-to-re-exports/_config.js | 10 ++++++++++ test/function/assignment-to-re-exports/count.js | 5 +++++ test/function/assignment-to-re-exports/main.js | 1 + 3 files changed, 16 insertions(+) create mode 100644 test/function/assignment-to-re-exports/_config.js create mode 100644 test/function/assignment-to-re-exports/count.js create mode 100644 test/function/assignment-to-re-exports/main.js diff --git a/test/function/assignment-to-re-exports/_config.js b/test/function/assignment-to-re-exports/_config.js new file mode 100644 index 0000000..376ba32 --- /dev/null +++ b/test/function/assignment-to-re-exports/_config.js @@ -0,0 +1,10 @@ +var assert = require( 'assert' ); + +module.exports = { + description: 're-exports are kept up-to-date', + exports: function ( exports ) { + assert.equal( exports.count, 0 ); + exports.incr(); + assert.equal( exports.count, 1 ); + } +}; diff --git a/test/function/assignment-to-re-exports/count.js b/test/function/assignment-to-re-exports/count.js new file mode 100644 index 0000000..2ed71df --- /dev/null +++ b/test/function/assignment-to-re-exports/count.js @@ -0,0 +1,5 @@ +export var count = 0; + +export function incr () { + count += 1; +} diff --git a/test/function/assignment-to-re-exports/main.js b/test/function/assignment-to-re-exports/main.js new file mode 100644 index 0000000..97b1267 --- /dev/null +++ b/test/function/assignment-to-re-exports/main.js @@ -0,0 +1 @@ +export {count, incr} from './count';