Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When instrumenting for coverage take into account that ES modules are…
… not transformed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228192026
- Loading branch information
1 parent
078c3c8
commit 5b0b316
Showing
6 changed files
with
51 additions
and
4 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
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
5 changes: 5 additions & 0 deletions
5
test/com/google/javascript/jscomp/testdata/CoverageInstrumentationPassTest/EsModule.jsdata
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,5 @@ | ||
import * as foo from 'bar'; | ||
|
||
export function qux() { | ||
console.log('baz'); | ||
} |
19 changes: 19 additions & 0 deletions
19
...m/google/javascript/jscomp/testdata/CoverageInstrumentationPassTest/EsModuleGolden.jsdata
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,19 @@ | ||
'use strict'; | ||
if (!self.window) { | ||
self.window = self; | ||
self.window.top = self; | ||
} | ||
var __jscov = window.top["__jscov"] || (window.top["__jscov"] = {"fileNames":[], "instrumentedLines":[], "executedLines":[]}); | ||
var JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata = []; | ||
__jscov["executedLines"].push(JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata); | ||
__jscov["instrumentedLines"].push("0d"); | ||
__jscov["fileNames"].push("CoverageInstrumentationPassTest/EsModule.jsdata"); | ||
JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata[0] = true; | ||
import*as foo from "bar"; | ||
JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata[2] = true; | ||
export function qux() { | ||
JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata[2] = true; | ||
JSCompiler_lcov_data_CoverageInstrumentationPassTest_EsModule_jsdata[3] = true; | ||
console.log("baz"); | ||
} | ||
; |