-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@bazel/jasmine): add coverage reporting
Adds Coverage collection support via the V8 Coverage API's This feature is disabled by default but can be enabled with `coverage = True` There is a performance overhead (~20%) by enabling this feature When enabled the only reported is text-summary which outputs the coverage summary as stdout, but we plan to intergrate with bazel coverage for better reporting accross a whole repository
- Loading branch information
Fabian Wiles
committed
Mar 19, 2019
1 parent
dea4201
commit dc8063f
Showing
10 changed files
with
1,102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const {isString} = require('./coverage_source'); | ||
|
||
describe('coverage function', () => { | ||
it('should cover one branch', () => { | ||
expect(isString(2)).toBe(false); | ||
}); | ||
it('should cover the other branch', () => { | ||
expect(isString('some string')).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function isString(input) { | ||
if (typeof input === 'string') { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
exports.isString = isString; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { isString } = require('./coverage_source'); | ||
|
||
describe('coverage function', () => { | ||
it('should cover one branch', () => { | ||
expect(isString(2)).toBe(false); | ||
}); | ||
it('should cover the other branch', () => { | ||
expect(isString('some string')).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function isString(input) { | ||
if (typeof input === 'string') { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
exports.isString = isString; |
Oops, something went wrong.