mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
8f06773a8c
PR-URL: https://github.com/nodejs/node/pull/28960 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
28 lines
431 B
JavaScript
28 lines
431 B
JavaScript
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()
|