Skip to content

Commit

Permalink
fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpza committed Dec 22, 2024
1 parent 3f9c2d4 commit b555498
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/tests/register.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { MockInstance } from "vitest";
import * as tsNode from "ts-node";
import { REGISTER_INSTANCE } from "ts-node";
import { PluginConfig } from "ts-patch";
Expand Down Expand Up @@ -49,7 +50,7 @@ describe(`Register script`, () => {
test(`Registers initial ts-node if none found`, () => {
const originalTsNodeInstance = global.process[instanceSymbol];
global.process[instanceSymbol] = void 0;
let registerSpy: vi.SpyInstance | undefined;
let registerSpy: MockInstance | undefined;
try {
registerSpy = vi.spyOn(tsNode, "register");
expect(global.process[instanceSymbol]).toBeUndefined();
Expand All @@ -70,7 +71,7 @@ describe(`Register script`, () => {
const originalTsNodeInstance = global.process[instanceSymbol];
// @ts-expect-error TS(2322) FIXME: Type 'unknown' is not assignable to type 'Service | undefined'.
global.process[instanceSymbol] = fakeInstance;
let registerSpy: vi.SpyInstance | undefined;
let registerSpy: MockInstance | undefined;
try {
registerSpy = vi.spyOn(tsNode, "register");

Expand Down Expand Up @@ -156,8 +157,8 @@ describe(`Register script`, () => {
}

describe.each(configMap)(`$label`, ({ transformers, hasBefore, hasAfterDeclarations }) => {
let mockTransformer: vi.SpyInstance;
let initializeSpy: vi.SpyInstance;
let mockTransformer: MockInstance;
let initializeSpy: MockInstance;
let registerResult: tsNode.RegisterOptions;
let instanceRegistrationResult: tsNode.Service;
let mergedTransformers: CustomTransformers;
Expand Down

0 comments on commit b555498

Please sign in to comment.