From e1286d36846054453e9b85ab2cef67ee1f03cec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Segersv=C3=A4rd?= Date: Mon, 2 May 2016 16:08:26 +0200 Subject: [PATCH] Add failing test case, which results in "var var ..." --- test/form/no-treeshake/_expected/amd.js | 7 ++++++- test/form/no-treeshake/_expected/cjs.js | 7 ++++++- test/form/no-treeshake/_expected/es6.js | 5 ++++- test/form/no-treeshake/_expected/iife.js | 7 ++++++- test/form/no-treeshake/_expected/umd.js | 7 ++++++- test/form/no-treeshake/main.js | 2 ++ 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/test/form/no-treeshake/_expected/amd.js b/test/form/no-treeshake/_expected/amd.js index c4a0beb..dcc376a 100644 --- a/test/form/no-treeshake/_expected/amd.js +++ b/test/form/no-treeshake/_expected/amd.js @@ -14,7 +14,12 @@ define(['exports', 'external'], function (exports, external) { 'use strict'; return 13 + external.value; } + var create = Object.create; + var getPrototypeOf = Object.getPrototypeOf; + exports.baz = baz; + exports.create = create; + exports.getPrototypeOf = getPrototypeOf; exports.strange = quux; -}); +}); \ No newline at end of file diff --git a/test/form/no-treeshake/_expected/cjs.js b/test/form/no-treeshake/_expected/cjs.js index dbd1396..0c4cd04 100644 --- a/test/form/no-treeshake/_expected/cjs.js +++ b/test/form/no-treeshake/_expected/cjs.js @@ -16,5 +16,10 @@ function baz () { return 13 + external.value; } +var create = Object.create; +var getPrototypeOf = Object.getPrototypeOf; + exports.baz = baz; -exports.strange = quux; +exports.create = create; +exports.getPrototypeOf = getPrototypeOf; +exports.strange = quux; \ No newline at end of file diff --git a/test/form/no-treeshake/_expected/es6.js b/test/form/no-treeshake/_expected/es6.js index 73ea36c..2cc9d8a 100644 --- a/test/form/no-treeshake/_expected/es6.js +++ b/test/form/no-treeshake/_expected/es6.js @@ -14,4 +14,7 @@ function baz () { return 13 + external.value; } -export { baz, quux as strange }; +var create = Object.create; +var getPrototypeOf = Object.getPrototypeOf; + +export { baz, create, getPrototypeOf, quux as strange }; \ No newline at end of file diff --git a/test/form/no-treeshake/_expected/iife.js b/test/form/no-treeshake/_expected/iife.js index 4835548..a796fa0 100644 --- a/test/form/no-treeshake/_expected/iife.js +++ b/test/form/no-treeshake/_expected/iife.js @@ -15,7 +15,12 @@ return 13 + external.value; } + var create = Object.create; + var getPrototypeOf = Object.getPrototypeOf; + exports.baz = baz; + exports.create = create; + exports.getPrototypeOf = getPrototypeOf; exports.strange = quux; -}((this.stirred = this.stirred || {}),external)); +}((this.stirred = this.stirred || {}),external)); \ No newline at end of file diff --git a/test/form/no-treeshake/_expected/umd.js b/test/form/no-treeshake/_expected/umd.js index 715d58b..ca49f0d 100644 --- a/test/form/no-treeshake/_expected/umd.js +++ b/test/form/no-treeshake/_expected/umd.js @@ -18,7 +18,12 @@ return 13 + external.value; } + var create = Object.create; + var getPrototypeOf = Object.getPrototypeOf; + exports.baz = baz; + exports.create = create; + exports.getPrototypeOf = getPrototypeOf; exports.strange = quux; -})); +})); \ No newline at end of file diff --git a/test/form/no-treeshake/main.js b/test/form/no-treeshake/main.js index 0ccd5e1..5a5f67e 100644 --- a/test/form/no-treeshake/main.js +++ b/test/form/no-treeshake/main.js @@ -9,3 +9,5 @@ function bar () { export function baz () { return 13 + external.value; } + +export var create = Object.create, getPrototypeOf = Object.getPrototypeOf;