1
0

switch to vitest

This commit is contained in:
2024-02-24 20:55:23 +01:00
parent 5aedc0248d
commit 7dce99214d
6 changed files with 1043 additions and 3398 deletions

View File

@@ -1,9 +0,0 @@
import type { Config } from 'jest'
const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
verbose: true
}
export default config

4416
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@
"types": "index.d.ts", "types": "index.d.ts",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"test": "jest" "test": "vitest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -32,12 +32,9 @@
}, },
"homepage": "https://github.com/tsndr/cloudflare-worker-router#readme", "homepage": "https://github.com/tsndr/cloudflare-worker-router#readme",
"devDependencies": { "devDependencies": {
"@cloudflare/workers-types": "^4.20231025.0", "@cloudflare/workers-types": "^4.20240222.0",
"@jest/globals": "^29.7.0", "@edge-runtime/vm": "^3.2.0",
"@types/jest": "^29.5.11", "typescript": "^5.3.3",
"jest": "^29.7.0", "vitest": "^1.3.1"
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"typescript": "^5.2.2"
} }
} }

View File

@@ -1,4 +1,4 @@
import { describe, expect, test } from '@jest/globals' import { describe, expect, test } from 'vitest'
import { Router } from '../src/index' import { Router } from '../src/index'
describe('Router', () => { describe('Router', () => {

9
vite.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
environment: 'edge-runtime',
reporters: ['verbose'],
watch: false
}
})