diff --git a/package.json b/package.json index 0b8fbe2..025492a 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ "prepublishOnly": "pnpm build", "release": "bumpp --commit --push --tag && pnpm publish", "dev:playground": "pnpm vite -c playground/vite.config.ts", - "quick:test": "node --loader ts-node/esm bin/test.ts", - "test": "node --loader ts-node/esm bin/test.ts", + "quick:test": "node --enable-source-maps --loader ts-node/esm bin/test.ts", + "test": "node --enable-source-maps --loader ts-node/esm bin/test.ts", "typecheck": "tsc --noEmit", "checks": "pnpm lint && pnpm typecheck" }, diff --git a/playground/vite.config.ts b/playground/vite.config.ts index fc3389c..5bb42a5 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -1,8 +1,12 @@ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error */ +/* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable @typescript-eslint/no-unused-vars */ + +// @ts-ignore import { z } from 'zod' import { defineConfig } from 'vite' -// @ts-expect-error osef +// @ts-ignore import { Schema, ValidateEnv } from '../src/index.js' export default defineConfig({ diff --git a/tests/common.spec.ts b/tests/common.spec.ts index b720731..489e8d8 100644 --- a/tests/common.spec.ts +++ b/tests/common.spec.ts @@ -268,7 +268,13 @@ test.group('vite-plugin-validate-env', () => { } const logs = ui.logger.getLogs() - assert.deepEqual(logs[0].message, 'cyan([vite-plugin-validate-env]) debug process.env content') - assert.deepInclude(logs[1].message, 'cyan(VITE_TESTX): not boolean') + const messages = logs.map((log) => log.message) + assert.isDefined( + messages.find( + (message) => message === 'cyan([vite-plugin-validate-env]) debug process.env content', + ), + ) + + assert.isDefined(messages.find((message) => message.includes('cyan(VITE_TESTX): not boolean'))) }) })