fix(02-01): add explicit vi import to 7 test scaffold files for TypeScript compatibility
vi.mock() is vitest-hoisted at runtime but TypeScript requires explicit import.
Adds: import { vi } from "vitest" to all 7 new test scaffolds.
npx tsc --noEmit now exits 0.
This commit is contained in:
1 parent
c74fc0d750
commit
4c8ca3ab2f
7 files changed
+7
-7
No files matched your search
@@ -8,7 +8,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* No real DB or Redis calls — all mocked.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* All tests are it.todo stubs until Wave 1 implementation.
|
||||
*/
|
||||
|
||||
import { describe, it } from "vitest";
|
||||
import { describe, it, vi } from "vitest";
|
||||
|
||||
// Mock server-only guard
|
||||
vi.mock("server-only", () => ({}));
|
||||
|
||||
Reference in new issue
Block a user