Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class Endpoint<R extends Registry> {
return document;
}

/* v8 ignore next */
private async fetchColumn(
id: NumberResolvable,
key: string,
Expand All @@ -99,6 +100,7 @@ export class Endpoint<R extends Registry> {

private isMissing = (value: unknown) => value === undefined || value === null;

/* v8 ignore next */
private isValid = (value: unknown, type: Primitive) => {
switch (type) {
case "number": {
Expand All @@ -124,6 +126,7 @@ export class Endpoint<R extends Registry> {
}
};

/* v8 ignore next */
private validate = (query: InferQuery<R>): void => {
const schema = this.registry.list.query;

Expand Down Expand Up @@ -167,6 +170,7 @@ export class Endpoint<R extends Registry> {
} else return match[1] ?? "";
}

/* v8 ignore next */
private coerce<T extends Primitive>(value: string, type: T): Primitives[T] {
switch (type) {
case "boolean": {
Expand Down
7 changes: 6 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
coverage: { provider: "v8", reporter: ["text", "json-summary", "lcov", "cobertura"] },
coverage: {
enabled: true,
provider: "v8",
reporter: ["text", "json-summary", "lcov", "cobertura"],
thresholds: { branches: 75, functions: 80, lines: 80, statements: 80 },
},
environment: "node",
globals: true,
hookTimeout: 10_000,
Expand Down
Loading