Skip to content

Commit 81c79be

Browse files
Expand Test Coverage (#262)
* functions exported with arguments * Test for strict removal * Test for removing strict declaration on mjs output when the output is an iife.
1 parent c2a4295 commit 81c79be

12 files changed

+91
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function bar(){console.log(1)};var foo=1;export{bar,foo};
1+
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function bar(){console.log(1)};var foo=1;export{bar,foo};
1+
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function bar(){console.log(1)};var foo=1;export{bar,foo};
1+
function bar(){console.log(1)};function baz(a){console.log(a)};var foo=1;export{bar,baz,foo};

test/export-named/fixtures/multiple.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ const foo = 1;
22
const bar = function() {
33
console.log(foo);
44
}
5-
export{foo, bar};
5+
const baz = function(name) {
6+
console.log(name);
7+
}
8+
export{foo, bar, baz};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
var modular=function(a){a.thing=1;return a}({});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
export const thing = 1;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export var thing=1;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export var thing=1;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export var thing=1;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
export const thing = 1;

0 commit comments

Comments
 (0)