Browse Source

update test

better-aggressive
Rich-Harris 9 years ago
parent
commit
d17dbbdd09
  1. 3
      test/form/dedupes-external-imports/_config.js
  2. 6
      test/form/dedupes-external-imports/_expected/amd.js
  3. 4
      test/form/dedupes-external-imports/_expected/cjs.js
  4. 2
      test/form/dedupes-external-imports/_expected/es6.js
  5. 8
      test/form/dedupes-external-imports/_expected/iife.js
  6. 12
      test/form/dedupes-external-imports/_expected/umd.js
  7. 6
      test/form/dedupes-external-imports/main.js

3
test/form/dedupes-external-imports/_config.js

@ -1,6 +1,7 @@
module.exports = {
description: 'dedupes external imports',
options: {
external: [ 'external' ]
external: [ 'external' ],
moduleName: 'myBundle'
}
};

6
test/form/dedupes-external-imports/_expected/amd.js

@ -1,4 +1,4 @@
define(['external'], function (external) { 'use strict';
define(['exports', 'external'], function (exports, external) { 'use strict';
class Foo extends external.Component {
constructor () {
@ -25,4 +25,8 @@ define(['external'], function (external) { 'use strict';
const bar = new Bar();
const baz = new Baz();
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;
});

4
test/form/dedupes-external-imports/_expected/cjs.js

@ -26,3 +26,7 @@ class Baz extends external.Component {
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;

2
test/form/dedupes-external-imports/_expected/es6.js

@ -24,3 +24,5 @@ class Baz extends Component {
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
export { foo, bar, baz };

8
test/form/dedupes-external-imports/_expected/iife.js

@ -1,4 +1,4 @@
(function (external) { 'use strict';
(function (exports,external) { 'use strict';
class Foo extends external.Component {
constructor () {
@ -25,4 +25,8 @@
const bar = new Bar();
const baz = new Baz();
})(external);
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;
})((this.myBundle = {}),external);

12
test/form/dedupes-external-imports/_expected/umd.js

@ -1,8 +1,8 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :
typeof define === 'function' && define.amd ? define(['external'], factory) :
factory(global.external);
}(this, function (external) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('external')) :
typeof define === 'function' && define.amd ? define(['exports', 'external'], factory) :
factory((global.myBundle = {}),global.external);
}(this, function (exports,external) { 'use strict';
class Foo extends external.Component {
constructor () {
@ -29,4 +29,8 @@
const bar = new Bar();
const baz = new Baz();
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;
}));

6
test/form/dedupes-external-imports/main.js

@ -2,6 +2,6 @@ import Foo from './foo';
import Bar from './bar';
import Baz from './baz';
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
export const foo = new Foo();
export const bar = new Bar();
export const baz = new Baz();

Loading…
Cancel
Save