From bdda8e6b3af8e774321f43e608a3687fa50c5803 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 25 Sep 2015 16:22:50 -0400 Subject: [PATCH] test for non-renamining of property keys --- test/function/property-keys-not-renamed/_config.js | 3 +++ test/function/property-keys-not-renamed/main.js | 7 +++++++ test/function/property-keys-not-renamed/one.js | 11 +++++++++++ test/function/property-keys-not-renamed/three.js | 11 +++++++++++ test/function/property-keys-not-renamed/two.js | 11 +++++++++++ 5 files changed, 43 insertions(+) create mode 100644 test/function/property-keys-not-renamed/_config.js create mode 100644 test/function/property-keys-not-renamed/main.js create mode 100644 test/function/property-keys-not-renamed/one.js create mode 100644 test/function/property-keys-not-renamed/three.js create mode 100644 test/function/property-keys-not-renamed/two.js diff --git a/test/function/property-keys-not-renamed/_config.js b/test/function/property-keys-not-renamed/_config.js new file mode 100644 index 0000000..d4e1f82 --- /dev/null +++ b/test/function/property-keys-not-renamed/_config.js @@ -0,0 +1,3 @@ +module.exports = { + description: 'does not rename property keys' +}; diff --git a/test/function/property-keys-not-renamed/main.js b/test/function/property-keys-not-renamed/main.js new file mode 100644 index 0000000..9134b8e --- /dev/null +++ b/test/function/property-keys-not-renamed/main.js @@ -0,0 +1,7 @@ +import one from './one'; +import two from './two'; +import three from './three'; + +assert.equal( one(), 'one' ); +assert.equal( two(), 'two' ); +assert.equal( three(), 'three' ); diff --git a/test/function/property-keys-not-renamed/one.js b/test/function/property-keys-not-renamed/one.js new file mode 100644 index 0000000..124f65a --- /dev/null +++ b/test/function/property-keys-not-renamed/one.js @@ -0,0 +1,11 @@ +const obj = { + foo: foo +}; + +function foo () { + return 'one'; +} + +export default function () { + return obj.foo(); +} diff --git a/test/function/property-keys-not-renamed/three.js b/test/function/property-keys-not-renamed/three.js new file mode 100644 index 0000000..f6ef70a --- /dev/null +++ b/test/function/property-keys-not-renamed/three.js @@ -0,0 +1,11 @@ +const obj = { + foo: foo +}; + +function foo () { + return 'three'; +} + +export default function () { + return obj.foo(); +} diff --git a/test/function/property-keys-not-renamed/two.js b/test/function/property-keys-not-renamed/two.js new file mode 100644 index 0000000..44874f0 --- /dev/null +++ b/test/function/property-keys-not-renamed/two.js @@ -0,0 +1,11 @@ +const obj = { + foo: foo +}; + +function foo () { + return 'two'; +} + +export default function () { + return obj.foo(); +}