Skip to content

Commit

Permalink
Converted most of the tests to include new proposed expected format f…
Browse files Browse the repository at this point in the history
…or the IIFE, effectively making them failing now - its setting a groundwork for an --extends option
  • Loading branch information
Andarist committed Jun 30, 2017
1 parent ef59ea2 commit 9d122ad
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
@@ -1,7 +1,7 @@
(function (exports) {
var myModule = (function (exports) {
'use strict';

exports.Foo = class Foo {};
exports.Foo = lol( exports.Foo );

}((this.myModule = this.myModule || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/assignment-to-exports/_expected/iife.js
@@ -1,6 +1,6 @@
(function (exports) {
var bundle = (function (exports) {
'use strict';

exports.foo = 1;

}((this.bundle = this.bundle || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/computed-properties/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var computedProperties = (function (exports) {
'use strict';

var foo = 'foo';
Expand All @@ -17,4 +17,4 @@
exports.x = x;
exports.X = X;

}((this.computedProperties = this.computedProperties || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/dedupes-external-imports/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports,external) {
var myBundle = (function (exports,external) {
'use strict';

class Foo extends external.Component {
Expand Down Expand Up @@ -30,4 +30,4 @@
exports.bar = bar;
exports.baz = baz;

}((this.myBundle = this.myBundle || {}),external));
}({},external));
4 changes: 2 additions & 2 deletions test/form/export-all-from-internal/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var exposedInternals = (function (exports) {
'use strict';

const a = 1;
Expand All @@ -7,4 +7,4 @@
exports.a = a;
exports.b = b;

}((this.exposedInternals = this.exposedInternals || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/export-all-multiple/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports,foo,bar,baz) {
var myBundle = (function (exports,foo,bar,baz) {
'use strict';


Expand All @@ -7,4 +7,4 @@
Object.keys(bar).forEach(function (key) { exports[key] = bar[key]; });
Object.keys(baz).forEach(function (key) { exports[key] = baz[key]; });

}((this.myBundle = this.myBundle || {}),foo,bar,baz));
}({},foo,bar,baz));
4 changes: 2 additions & 2 deletions test/form/export-default-import/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports,x) {
var myBundle = (function (exports,x) {
'use strict';

x = x && 'default' in x ? x['default'] : x;
Expand All @@ -7,4 +7,4 @@

exports.x = x;

}((this.myBundle = this.myBundle || {}),x));
}({},x));
4 changes: 2 additions & 2 deletions test/form/exports-at-end-if-possible/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var myBundle = (function (exports) {
'use strict';

var FOO = 'foo';
Expand All @@ -9,4 +9,4 @@

exports.FOO = FOO;

}((this.myBundle = this.myBundle || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/legacy-getter/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var foo = (function (exports) {
'use strict';

var browserSpecificThing;
Expand All @@ -21,4 +21,4 @@

exports.B = browserStuff;

}((this.foo = this.foo || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/legacy/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var myBundle = (function (exports) {
'use strict';

const foo = 1;
Expand All @@ -18,4 +18,4 @@
exports.a = a;
exports.b = b;

}((this.myBundle = this.myBundle || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/multiple-exports/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var myBundle = (function (exports) {
'use strict';

var foo = 1;
Expand All @@ -7,4 +7,4 @@
exports.foo = foo;
exports.bar = bar;

}((this.myBundle = this.myBundle || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/no-treeshake/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports,external) {
var stirred = (function (exports,external) {
'use strict';

var foo = 'unused';
Expand All @@ -23,4 +23,4 @@
exports.getPrototypeOf = getPrototypeOf;
exports.strange = quux;

}((this.stirred = this.stirred || {}),external));
}({},external));
4 changes: 2 additions & 2 deletions test/form/preserves-comments-after-imports/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var myBundle = (function (exports) {
'use strict';

/** A comment for a number */
Expand All @@ -9,4 +9,4 @@

exports.obj = obj;

}((this.myBundle = this.myBundle || {})));
}({}));
4 changes: 2 additions & 2 deletions test/form/reexports-from-external/_expected/iife.js
@@ -1,8 +1,8 @@
(function (exports,external) {
var myBundle = (function (exports,external) {
'use strict';



Object.keys(external).forEach(function (key) { exports[key] = external[key]; });

}((this.myBundle = this.myBundle || {}),external));
}({},external));
4 changes: 2 additions & 2 deletions test/form/umd-noconflict/_expected/iife.js
@@ -1,4 +1,4 @@
(function (exports) {
var FooBar = (function (exports) {
'use strict';

function doThings() {
Expand All @@ -13,4 +13,4 @@
exports.number = number;
exports.setting = setting;

}((this.FooBar = this.FooBar || {})));
}({}));

0 comments on commit 9d122ad

Please sign in to comment.