Browse Source

test for #77

contingency-plan
Rich-Harris 10 years ago
parent
commit
36be9196f5
  1. 6
      test/form/dedupes-external-imports/_config.js
  2. 28
      test/form/dedupes-external-imports/_expected/amd.js
  3. 28
      test/form/dedupes-external-imports/_expected/cjs.js
  4. 26
      test/form/dedupes-external-imports/_expected/es6.js
  5. 28
      test/form/dedupes-external-imports/_expected/iife.js
  6. 32
      test/form/dedupes-external-imports/_expected/umd.js
  7. 8
      test/form/dedupes-external-imports/bar.js
  8. 8
      test/form/dedupes-external-imports/baz.js
  9. 8
      test/form/dedupes-external-imports/foo.js
  10. 7
      test/form/dedupes-external-imports/main.js

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

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

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

@ -0,0 +1,28 @@
define(['external'], function (external) { 'use strict';
class Foo extends external.Component {
constructor () {
super();
this.isFoo = true;
}
}
class Bar extends external.Component {
constructor () {
super();
this.isBar = true;
}
}
class Baz extends external.Component {
constructor () {
super();
this.isBaz = true;
}
}
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
});

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

@ -0,0 +1,28 @@
'use strict';
var external = require('external');
class Foo extends external.Component {
constructor () {
super();
this.isFoo = true;
}
}
class Bar extends external.Component {
constructor () {
super();
this.isBar = true;
}
}
class Baz extends external.Component {
constructor () {
super();
this.isBaz = true;
}
}
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();

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

@ -0,0 +1,26 @@
import { Component } from 'external';
class Foo extends Component {
constructor () {
super();
this.isFoo = true;
}
}
class Bar extends Component {
constructor () {
super();
this.isBar = true;
}
}
class Baz extends Component {
constructor () {
super();
this.isBaz = true;
}
}
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();

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

@ -0,0 +1,28 @@
(function (external) { 'use strict';
class Foo extends external.Component {
constructor () {
super();
this.isFoo = true;
}
}
class Bar extends external.Component {
constructor () {
super();
this.isBar = true;
}
}
class Baz extends external.Component {
constructor () {
super();
this.isBaz = true;
}
}
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
})(external);

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

@ -0,0 +1,32 @@
(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';
class Foo extends external.Component {
constructor () {
super();
this.isFoo = true;
}
}
class Bar extends external.Component {
constructor () {
super();
this.isBar = true;
}
}
class Baz extends external.Component {
constructor () {
super();
this.isBaz = true;
}
}
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
}));

8
test/form/dedupes-external-imports/bar.js

@ -0,0 +1,8 @@
import { Component } from 'external';
export default class Bar extends Component {
constructor () {
super();
this.isBar = true;
}
}

8
test/form/dedupes-external-imports/baz.js

@ -0,0 +1,8 @@
import { Component as Comp } from 'external';
export default class Baz extends Comp {
constructor () {
super();
this.isBaz = true;
}
}

8
test/form/dedupes-external-imports/foo.js

@ -0,0 +1,8 @@
import { Component } from 'external';
export default class Foo extends Component {
constructor () {
super();
this.isFoo = true;
}
}

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

@ -0,0 +1,7 @@
import Foo from './foo';
import Bar from './bar';
import Baz from './baz';
const foo = new Foo();
const bar = new Bar();
const baz = new Baz();
Loading…
Cancel
Save