mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
5 changed files with 25 additions and 5 deletions
@ -0,0 +1,9 @@ |
|||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
solo: true, |
||||
|
description: 'skips a dead branch (f)', |
||||
|
code: function ( code ) { |
||||
|
assert.equal( code.indexOf( 'obj.foo = function' ), -1, code ); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
var obj = {}; |
||||
|
obj.foo = function () { |
||||
|
console.log( 'this should be excluded' ); |
||||
|
} |
||||
|
|
||||
|
function bar () { |
||||
|
console.log( 'this should be included' ); |
||||
|
} |
||||
|
|
||||
|
if ( NaN === NaN ) obj.foo(); |
||||
|
bar(); |
Loading…
Reference in new issue