Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add failing test for default import exportMode check
  • Loading branch information
guybedford authored and lukastaegert committed May 15, 2018
1 parent f837dd0 commit 4b0b32b
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/chunking-form/samples/entry-chunk-export-mode/_config.js
@@ -0,0 +1,6 @@
module.exports = {
description: 'entry chunk export mode checks',
options: {
input: ['main1.js', 'main2.js']
}
};
@@ -0,0 +1,5 @@
define(['./main2.js'], function (main2) { 'use strict';

main2();

});
@@ -0,0 +1,9 @@
define(function () { 'use strict';

function fn () {
console.log('main fn');
}

return fn;

});
@@ -0,0 +1,5 @@
'use strict';

var main2 = require('./main2.js');

main2();
@@ -0,0 +1,7 @@
'use strict';

function fn () {
console.log('main fn');
}

module.exports = fn;
@@ -0,0 +1,3 @@
import fn from './main2.js';

fn();
@@ -0,0 +1,5 @@
function fn () {
console.log('main fn');
}

export default fn;
@@ -0,0 +1,14 @@
System.register(['./main2.js'], function (exports, module) {
'use strict';
var fn;
return {
setters: [function (module) {
fn = module.default;
}],
execute: function () {

fn();

}
};
});
@@ -0,0 +1,13 @@
System.register([], function (exports, module) {
'use strict';
return {
execute: function () {

exports('default', fn);
function fn () {
console.log('main fn');
}

}
};
});
4 changes: 4 additions & 0 deletions test/chunking-form/samples/entry-chunk-export-mode/main1.js
@@ -0,0 +1,4 @@
import fn from './main2.js';


fn();
3 changes: 3 additions & 0 deletions test/chunking-form/samples/entry-chunk-export-mode/main2.js
@@ -0,0 +1,3 @@
export default function fn () {
console.log('main fn');
}

0 comments on commit 4b0b32b

Please sign in to comment.