refactor(tests): remove zx globals import from global.d.ts and lifecycle.ts

- Eliminated unnecessary import of 'zx/globals' from both global.d.ts and lifecycle.ts files to streamline test setup.
- Ensured that the test lifecycle remains intact while improving code clarity.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-05-06 00:55:51 +08:00
parent d75dcd72c8
commit 574f02b2f1
3 changed files with 2 additions and 7 deletions

View File

@@ -2,7 +2,6 @@ import type { WrappedConsola } from '@innei/pretty-logger-nestjs/lib/consola'
import type { Document, PaginateModel } from 'mongoose'
import 'vitest/globals'
import 'zx/globals'
import type { ModelType } from '@typegoose/typegoose/lib/types'

View File

@@ -1,16 +1,11 @@
// @ts-nocheck
import { beforeAll } from 'vitest'
import 'zx/globals'
import { dbHelper } from 'test/helper/db-mock.helper'
import { redisHelper } from 'test/helper/redis-mock.helper'
import { beforeAll } from 'vitest'
import { registerJSONGlobal } from '~/global/json.global'
beforeAll(async () => {
await import('zx/globals')
global.isDev = true
global.cwd = process.cwd()
global.consola = console

View File

@@ -1,4 +1,5 @@
import { pickImagesFromMarkdown } from '~/utils/pic.util'
import { sleep } from '~/utils/tool.util'
describe('src/utils/pic.util', () => {
test('marked ast', async () => {