-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
BREAKING CHANGE: c8 will now load source-maps if possible and remap coverage accordingly
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
if (false) { | ||
console.info('unreachable') | ||
} else if (true) { | ||
console.info('reachable') | ||
} else { | ||
console.info('unreachable') | ||
} | ||
|
||
function branch (a) { | ||
if (a) { | ||
console.info('a = true') | ||
} else if (undefined) { | ||
console.info('unreachable') | ||
} else { | ||
console.info('a = false') | ||
} | ||
} | ||
|
||
branch(true) | ||
branch(false) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
enum ATrue { | ||
IsTrue = 1, | ||
IsFalse = 0 | ||
} | ||
|
||
if (false) { | ||
console.info('unreachable') | ||
} else if (true) { | ||
console.info('reachable') | ||
} else { | ||
console.info('unreachable') | ||
} | ||
|
||
function branch (a: boolean) { | ||
if (a) { | ||
console.info('a = true') | ||
} else if (undefined) { | ||
console.info('unreachable') | ||
} else { | ||
console.info('a = false') | ||
} | ||
} | ||
|
||
branch(!!ATrue.IsTrue) | ||
branch(!!ATrue.IsFalse) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class Foo { | ||
constructor (x=33) { | ||
this.x = x ? x : 99 | ||
if (this.x) { | ||
console.info('covered') | ||
} else { | ||
console.info('uncovered') | ||
} | ||
this.methodC() | ||
} | ||
methodA () { | ||
console.info('covered') | ||
} | ||
methodB () { | ||
console.info('uncovered') | ||
} | ||
methodC () { | ||
console.info('covered') | ||
} | ||
methodD () { | ||
console.info('uncovered') | ||
} | ||
} | ||
|
||
const a = new Foo(0) | ||
const b = new Foo(33) | ||
a.methodA() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.