From 8bbbdb6fa48459a8cf4ba976471e26d4d6fd2683 Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Wed, 29 Mar 2023 20:19:53 +0800 Subject: [PATCH] Update tests and imports Use correct scope. --- package.json | 3 ++- src/__tests__/index.test.ts | 4 ++-- src/modules/card/__tests__/service.test.ts | 2 +- src/modules/card/service.ts | 2 +- yarn.lock | 3 +++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 54be5f4..96cd694 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ "vitest": "^0.9.4" }, "dependencies": { - "fastify": "^3.27.0" + "fastify": "^3.27.0", + "@modal-sh/oblique-strategies-core": "file:../core" }, "scripts": { "prepublishOnly": "pridepack clean && pridepack build", diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index fd57bc8..ab3bb46 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -6,11 +6,11 @@ import { vi, } from 'vitest'; import { FastifyInstance } from 'fastify'; -import { generate } from '@theoryofnekomata/oblique-strategies-core'; +import { generate } from '@modal-sh/oblique-strategies-core'; import { createServer } from '../server'; import { addRoutes } from '../routes'; -vi.mock('@theoryofnekomata/oblique-strategies-core'); +vi.mock('@modal-sh/oblique-strategies-core'); describe('Example', () => { let server: FastifyInstance; diff --git a/src/modules/card/__tests__/service.test.ts b/src/modules/card/__tests__/service.test.ts index faf48be..7d87312 100644 --- a/src/modules/card/__tests__/service.test.ts +++ b/src/modules/card/__tests__/service.test.ts @@ -8,7 +8,7 @@ import { import { generate } from '@modal-sh/oblique-strategies-core'; import { CardService, CardServiceImpl } from '../service'; -vi.mock('@theoryofnekomata/oblique-strategies-core'); +vi.mock('@modal-sh/oblique-strategies-core'); describe('CardService', () => { let cardService: CardService; diff --git a/src/modules/card/service.ts b/src/modules/card/service.ts index 5e155a2..378bc4a 100644 --- a/src/modules/card/service.ts +++ b/src/modules/card/service.ts @@ -1,4 +1,4 @@ -import { generate as coreGenerate } from '@theoryofnekomata/oblique-strategies-core'; +import { generate as coreGenerate } from '@modal-sh/oblique-strategies-core'; export interface CardService { generate(cards?: string[]): string diff --git a/yarn.lock b/yarn.lock index 8adb5ba..fb0bbdf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -327,6 +327,9 @@ resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.1.18.tgz#eb960654aec3ebb6f39a9469845659a8c1d50b3a" integrity sha512-Ap8MOYbyvEilK1+sNY6yh6LmsHSp7f5zzSGlY4AemhbTcoultcozEXPzx42OO6WjoriOsw88aW8TiqgYdXwsxg== +"@modal-sh/oblique-strategies-core@file:../core": + version "0.0.0" + "@next/eslint-plugin-next@^12.0.7": version "12.1.5" resolved "https://registry.yarnpkg.com/@next/eslint-plugin-next/-/eslint-plugin-next-12.1.5.tgz#273885b35e6bbcd40ff1436d2a8d0ec03fb6f6ef"