Created
June 27, 2018 03:38
-
-
Save ryanluker/636d39686f65495a63e2cc88002603b3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
test("Run display coverage on node test file @integration", async () => { | |
const extension = await vscode.extensions.getExtension("ryanluker.vscode-coverage-gutters"); | |
const getCachedLines = extension.exports; | |
const testCoverage = await vscode.workspace.findFiles("**/test-coverage.js", "**/node_modules/**"); | |
const testDocument = await vscode.workspace.openTextDocument(testCoverage[0]); | |
const testEditor = await vscode.window.showTextDocument(testDocument); | |
await vscode.commands.executeCommand("extension.displayCoverage"); | |
// Wait for decorations to load | |
await sleep(2000); | |
// Look for exact coverage on the file | |
const cachedLines: ICoverageLines = getCachedLines(); | |
assert.equal(14, cachedLines.full.length); | |
assert.equal(4, cachedLines.none.length); | |
assert.equal(7, cachedLines.partial.length); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment