test: lock V8 coverage counter semantics

This commit is contained in:
DongHyeonka
2026-08-02 10:12:34 +09:00
parent 5cc6b8a51c
commit 76bf9f1aa3
18 changed files with 826 additions and 4 deletions
@@ -0,0 +1,19 @@
/// <reference types="vitest/globals" />
import "./src/import-empty.ts";
import "./src/import-side-effect.ts";
import "./src/import-type-empty.ts";
import { importedRuntimeValue } from "./src/import-value.ts";
import { runtimeValue as namedRuntimeValue } from "./src/reexport-named.ts";
import { runtimeValue } from "./src/runtime.ts";
import { runtimeValue as starRuntimeValue } from "./src/reexport-star.ts";
import type {} from "./src/type-only.ts";
test("loads every counter semantics module", () => {
expect([
runtimeValue,
importedRuntimeValue,
namedRuntimeValue,
starRuntimeValue,
]).toEqual([1, 1, 1, 1]);
});
@@ -0,0 +1 @@
import {} from "./runtime.ts";
@@ -0,0 +1 @@
import "./runtime.ts";
@@ -0,0 +1 @@
import type {} from "./runtime.ts";
@@ -0,0 +1,3 @@
import { runtimeValue } from "./runtime.ts";
export { runtimeValue as importedRuntimeValue };
@@ -0,0 +1 @@
export { runtimeValue } from "./runtime.ts";
@@ -0,0 +1 @@
export * from "./runtime.ts";
@@ -0,0 +1 @@
export const runtimeValue = 1;
@@ -0,0 +1,5 @@
export interface CounterFixtureShape {
readonly value: number;
}
export type CounterFixtureValue = CounterFixtureShape["value"];