Browse Source

add some failing tests

gh-438-b
Rich-Harris 9 years ago
parent
commit
680be6973e
  1. 3
      test/form/side-effect-n/_config.js
  2. 9
      test/form/side-effect-n/main.js
  3. 3
      test/form/side-effect-o/_config.js
  4. 13
      test/form/side-effect-o/main.js
  5. 2
      test/function/iife-comments/_config.js

3
test/form/side-effect-n/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'detects side-effects in complex call expressions'
};

9
test/form/side-effect-n/main.js

@ -0,0 +1,9 @@
function foo () {
console.log( 'foo' );
}
function bar () {
console.log( 'bar' );
}
( Math.random() < 0.5 ? foo : bar )();

3
test/form/side-effect-o/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'detects side-effects in complex call expressions'
};

13
test/form/side-effect-o/main.js

@ -0,0 +1,13 @@
function fn () {
return Math.random() < 0.5 ? foo : bar;
}
function foo () {
console.log( 'foo' );
}
function bar () {
console.log( 'bar' );
}
fn()();

2
test/function/iife-comments/_config.js

@ -5,4 +5,4 @@ module.exports = {
exports: function ( exports ) {
assert.equal( exports, 42 );
}
}
};

Loading…
Cancel
Save