Skip to content

Commit

Permalink
Switch to c8 for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Silic0nS0ldier committed May 28, 2020
1 parent a2af515 commit 0c3123a
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 521 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"name": "Run tests",
"run": "./node_modules/.bin/nyc --reporter=lcovonly npm test"
"run": "npm test"
},
{
"name": "Push coverage to Codecov",
Expand Down
3 changes: 2 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"vpath",
"gulpplugin",
"gulpfile",
"automerged"
"automerged",
"lcovonly"
],
"ignorePaths": [
"cspell.json",
Expand Down
576 changes: 64 additions & 512 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"types": "./dist/main.d.ts",
"scripts": {
"pretest": "tsc && api-extractor run --local",
"test": "nyc --reporter=text ava",
"test": "c8 --all --reporter=text --reporter=lcovonly ava",
"prepublishOnly": "tsc",
"preversion": "npm test",
"version": "npm run version:apiDocRefresh && npm run version:changelogBump",
Expand Down Expand Up @@ -58,8 +58,8 @@
"@types/node": "^14.0.1",
"@types/vinyl": "^2.0.4",
"ava": "^3.7.1",
"c8": "^7.1.2",
"changelog-updater": "^1.1.0",
"nyc": "^15.0.1",
"p-defer": "^3.0.0",
"sort-on": "^4.1.0",
"typescript": "^3.8.3"
Expand Down
4 changes: 1 addition & 3 deletions src/bundle-orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class BundleOrchestrator extends Transform {
});

// First up, we assign the logger if its there
/* istanbul ignore else */
/* c8 ignore else */
if (config.Logger) this.logger = config.Logger;

// Results callback
Expand Down Expand Up @@ -190,9 +190,7 @@ export class BundleOrchestrator extends Transform {
callback();
}
catch (error) {
/* istanbul ignore next This is only here to ensure we are a polite pipeline member, and cannot be reasonably tested */
this.logger.error("_transform completed with error", { error });
/* istanbul ignore next */
callback(new PluginError(PluginName, error));
}
}
Expand Down
1 change: 0 additions & 1 deletion src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export class Bundle {
const orderedFiles: Vinyl[] = [];
for (const path of this.initialPaths) {
const file = this.files.get(path);
/* istanbul ignore else map.get can technically be undefined */
if (file) orderedFiles.push(file);
else throw new Error("Unexpected condition, previously tracked file is undefined");
}
Expand Down
1 change: 0 additions & 1 deletion src/test-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ExecutionContext } from "ava";
* Maps lib logging to ava logging to assist debugging of failing tests.
* @param t Execution context for test. Needed to associate logs with tests.
*/
/* istanbul ignore next */
export function mapAvaLoggerToStandard(t: ExecutionContext): TsLog.Logger {
return {
debug(message, ...optionalParams) {
Expand Down

0 comments on commit 0c3123a

Please sign in to comment.