Browse Source

Updated tests to contain `import * as ns from ".."`

contingency-plan
Oskar Segersvärd 10 years ago
parent
commit
08c2826760
  1. 2
      test/form/external-imports/_config.js
  2. 3
      test/form/external-imports/_expected/amd.js
  3. 2
      test/form/external-imports/_expected/cjs.js
  4. 2
      test/form/external-imports/_expected/es6.js
  5. 5
      test/form/external-imports/_expected/iife.js
  6. 9
      test/form/external-imports/_expected/umd.js
  7. 2
      test/form/external-imports/main.js

2
test/form/external-imports/_config.js

@ -1,6 +1,6 @@
module.exports = {
description: 'prefixes global names with `global.` when creating UMD bundle (#57)',
options: {
external: [ 'factory', 'baz', 'alphabet' ]
external: [ 'factory', 'baz', 'shipping-port', 'alphabet' ]
}
};

3
test/form/external-imports/_expected/amd.js

@ -1,9 +1,10 @@
define(['factory', 'baz', 'alphabet'], function (factory, baz, alphabet) { 'use strict';
define(['factory', 'baz', 'shipping-port', 'alphabet'], function (factory, baz, containers, alphabet) { 'use strict';
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
factory( null );
baz.foo( baz.bar );
containers.forEach( console.log, console );
console.log( alphabet.a );
console.log( alphabet__default.length );

2
test/form/external-imports/_expected/cjs.js

@ -3,10 +3,12 @@
var factory = require('factory');
factory = 'default' in factory ? factory['default'] : factory;
var baz = require('baz');
var containers = require('shipping-port');
var alphabet = require('alphabet');
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
factory( null );
baz.foo( baz.bar );
containers.forEach( console.log, console );
console.log( alphabet.a );
console.log( alphabet__default.length );

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

@ -1,8 +1,10 @@
import factory from 'factory';
import { bar, foo } from 'baz';
import * as containers from 'shipping-port';
import alphabet, { a } from 'alphabet';
factory( null );
foo( bar );
containers.forEach( console.log, console );
console.log( a );
console.log( alphabet.length );

5
test/form/external-imports/_expected/iife.js

@ -1,10 +1,11 @@
(function (factory,baz,alphabet) { 'use strict';
(function (factory,baz,containers,alphabet) { 'use strict';
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
factory( null );
baz.foo( baz.bar );
containers.forEach( console.log, console );
console.log( alphabet.a );
console.log( alphabet__default.length );
})(factory,baz,alphabet);
})(factory,baz,containers,alphabet);

9
test/form/external-imports/_expected/umd.js

@ -1,13 +1,14 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('factory'), require('baz'), require('alphabet')) :
typeof define === 'function' && define.amd ? define(['factory', 'baz', 'alphabet'], factory) :
factory(global.factory,global.baz,global.alphabet);
}(this, function (factory,baz,alphabet) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('factory'), require('baz'), require('shipping-port'), require('alphabet')) :
typeof define === 'function' && define.amd ? define(['factory', 'baz', 'shipping-port', 'alphabet'], factory) :
factory(global.factory,global.baz,global.containers,global.alphabet);
}(this, function (factory,baz,containers,alphabet) { 'use strict';
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
factory( null );
baz.foo( baz.bar );
containers.forEach( console.log, console );
console.log( alphabet.a );
console.log( alphabet__default.length );

2
test/form/external-imports/main.js

@ -1,8 +1,10 @@
import factory from 'factory';
import { foo, bar } from 'baz';
import * as containers from 'shipping-port';
import alphabet, { a, b } from 'alphabet';
factory( null );
foo( bar );
containers.forEach( console.log, console );
console.log( a );
console.log( alphabet.length );

Loading…
Cancel
Save