Skip to content

Commit

Permalink
fix: allow empty coverage
Browse files Browse the repository at this point in the history
There is currently an issue in CI where code coverage is not being
reported even though it runs fine locally. While I look into this
I'm going to disable it here for now and test it out in a downstream
project with more coverage.
  • Loading branch information
jacobheun committed Jan 28, 2024
1 parent a643341 commit 4c764f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .taprc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# vim: set filetype=yaml :
disable-coverage: false
allow-incomplete-coverage: false
allow-empty-coverage: true
allow-incomplete-coverage: true
plugin:
- "@tapjs/sinon"
- "!@tapjs/intercept"
- "@tapjs/tsx"
- "!@tapjs/typescript"
color: true
reporter: base
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"mustache": "^4.2.0"
},
"devDependencies": {
"@istanbuljs/esm-loader-hook": "^0.2.0",
"@tapjs/esbuild-kit": "^1.1.19",
"@tapjs/sinon": "^1.1.18",
"@tapjs/tsx": "^1.1.19",
"@tsconfig/node20": "^20.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/mustache.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import t from "tap";
import { mustache } from "../lib/mustache.ts";
import { mustache } from "../lib/mustache";

void t.test("mustache", async (t) => {
await t.test("must include a path", (t) => {
Expand All @@ -9,7 +9,7 @@ void t.test("mustache", async (t) => {
});

await t.test("should generate", async (t) => {
const { mustache } = t.mockRequire<typeof import("../lib/mustache.ts")>("../lib/mustache.ts", {
const { mustache } = t.mockRequire<typeof import("../lib/mustache")>("../lib/mustache", {
"node:fs/promises": {
readFile: (path: string) => {
t.equal(path, "path/to/file.txt");
Expand All @@ -31,7 +31,7 @@ void t.test("mustache", async (t) => {
});

await t.test("should validate partials", async (t) => {
const { mustache } = t.mockRequire<typeof import("../lib/mustache.ts")>("../lib/mustache.ts", {
const { mustache } = t.mockRequire<typeof import("../lib/mustache")>("../lib/mustache", {
"node:fs/promises": {
readFile: () => Promise.resolve("<% title %>")
}
Expand Down Expand Up @@ -59,7 +59,7 @@ void t.test("mustache", async (t) => {
});

await t.test("should fail validation when base template not found", async (t) => {
const { mustache } = t.mockRequire<typeof import("../lib/mustache.ts")>("../lib/mustache.ts", {
const { mustache } = t.mockRequire<typeof import("../lib/mustache")>("../lib/mustache", {
"node:fs/promises": {
readFile: () => Promise.resolve("<% title %>")
}
Expand Down

0 comments on commit 4c764f7

Please sign in to comment.