Browse Source

Add failing test

gh-438-b
Oskar Segersvärd 9 years ago
parent
commit
a739c51d32
  1. 12
      test/function/export-destruction/_config.js
  2. 5
      test/function/export-destruction/main.js

12
test/function/export-destruction/_config.js

@ -0,0 +1,12 @@
var assert = require( 'assert' );
module.exports = {
description: 'handle destruction patterns in export declarations',
babel: true,
exports: function ( exports ) {
assert.deepEqual( Object.keys( exports ), [ 'baz', 'quux' ] );
assert.equal( exports.baz, 5 );
assert.equal( exports.quux, 17 );
}
};

5
test/function/export-destruction/main.js

@ -0,0 +1,5 @@
var foo = { bar: { baz: 5 } };
var arr = [ { quux: 'wrong' }, { quux: 17 } ];
export var { bar: { baz } } = foo;
export var [ /* skip */, { quux } ] = arr;
Loading…
Cancel
Save