Skip to content

Commit

Permalink
Merge remote-tracking branch 'nathancahill/broken-test-sequences' int…
Browse files Browse the repository at this point in the history
…o fix-sequence-expressions
  • Loading branch information
lukastaegert committed Nov 10, 2017
2 parents 1035774 + f79f508 commit d04644a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/form/samples/sequence-expression/_expected/amd.js
@@ -1,5 +1,8 @@
define(function () { 'use strict';

function foo$1 () {
console.log( 'foo' );
}
// should remove expressions without side-effect, multiple effects
var a = (foo(), foo(), 2);
// without white-space, effect at the end
Expand All @@ -10,5 +13,7 @@ define(function () { 'use strict';
console.log(d);

// should infer value
// should keep f import
var e = (foo$1());

});
5 changes: 5 additions & 0 deletions test/form/samples/sequence-expression/_expected/cjs.js
@@ -1,5 +1,8 @@
'use strict';

function foo$1 () {
console.log( 'foo' );
}
// should remove expressions without side-effect, multiple effects
var a = (foo(), foo(), 2);
// without white-space, effect at the end
Expand All @@ -10,3 +13,5 @@ var d = (2);
console.log(d);

// should infer value
// should keep f import
var e = (foo$1());
5 changes: 5 additions & 0 deletions test/form/samples/sequence-expression/_expected/es.js
@@ -1,3 +1,6 @@
function foo$1 () {
console.log( 'foo' );
}
// should remove expressions without side-effect, multiple effects
var a = (foo(), foo(), 2);
// without white-space, effect at the end
Expand All @@ -8,3 +11,5 @@ var d = (2);
console.log(d);

// should infer value
// should keep f import
var e = (foo$1());
5 changes: 5 additions & 0 deletions test/form/samples/sequence-expression/_expected/iife.js
@@ -1,6 +1,9 @@
(function () {
'use strict';

function foo$1 () {
console.log( 'foo' );
}
// should remove expressions without side-effect, multiple effects
var a = (foo(), foo(), 2);
// without white-space, effect at the end
Expand All @@ -11,5 +14,7 @@
console.log(d);

// should infer value
// should keep f import
var e = (foo$1());

}());
5 changes: 5 additions & 0 deletions test/form/samples/sequence-expression/_expected/umd.js
Expand Up @@ -4,6 +4,9 @@
(factory());
}(this, (function () { 'use strict';

function foo$1 () {
console.log( 'foo' );
}
// should remove expressions without side-effect, multiple effects
var a = (foo(), foo(), 2);
// without white-space, effect at the end
Expand All @@ -14,5 +17,7 @@
console.log(d);

// should infer value
// should keep f import
var e = (foo$1());

})));
3 changes: 3 additions & 0 deletions test/form/samples/sequence-expression/foo.js
@@ -0,0 +1,3 @@
export function foo () {
console.log( 'foo' );
}
3 changes: 3 additions & 0 deletions test/form/samples/sequence-expression/main.js
@@ -1,3 +1,4 @@
import * as f from './foo';
// should remove expressions without side-effect, multiple effects
var a = (0, foo(), 1, foo(), 2);
// without white-space, effect at the end
Expand All @@ -15,3 +16,5 @@ if ((1, 2) !== 2) {
console.log( 'effect' );
}

// should keep f import
var e = (0, f.foo());

0 comments on commit d04644a

Please sign in to comment.