Browse Source

add test for #57

contingency-plan
Rich Harris 10 years ago
parent
commit
53fa8fce8b
  1. 6
      test/form/external-imports/_config.js
  2. 5
      test/form/external-imports/_expected/amd.js
  3. 6
      test/form/external-imports/_expected/cjs.js
  4. 1
      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

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

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

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

@ -0,0 +1,5 @@
define(['factory'], function (factory) { 'use strict';
factory( null );
});

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

@ -0,0 +1,6 @@
'use strict';
var factory = require('factory');
factory = 'default' in factory ? factory['default'] : factory;
factory( null );

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

@ -0,0 +1 @@
factory( null );

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

@ -0,0 +1,5 @@
(function (factory) { 'use strict';
factory( null );
})(factory);

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

@ -0,0 +1,9 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('factory')) :
typeof define === 'function' && define.amd ? define(['factory'], factory) :
factory(global.factory);
}(this, function (factory) { 'use strict';
factory( null );
}));

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

@ -0,0 +1,2 @@
import factory from 'factory';
factory( null );
Loading…
Cancel
Save