switch to vitest
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
import type { Config } from 'jest'
|
|
||||||
|
|
||||||
const config: Config = {
|
|
||||||
preset: 'ts-jest',
|
|
||||||
testEnvironment: 'node',
|
|
||||||
verbose: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
||||||
4350
package-lock.json
generated
4350
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -10,7 +10,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "jest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -30,13 +30,11 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/tsndr/cloudflare-worker-jwt#readme",
|
"homepage": "https://github.com/tsndr/cloudflare-worker-jwt#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cloudflare/workers-types": "^4.20231025.0",
|
"@cloudflare/workers-types": "^4.20240208.0",
|
||||||
"@jest/globals": "^29.7.0",
|
"@edge-runtime/vm": "^3.2.0",
|
||||||
"@types/jest": "^29.5.8",
|
"@types/node": "^20.11.19",
|
||||||
"@types/node": "^20.9.0",
|
"ts-node": "^10.9.2",
|
||||||
"jest": "^29.7.0",
|
"typescript": "^5.3.3",
|
||||||
"ts-jest": "^29.1.1",
|
"vitest": "^1.3.1"
|
||||||
"ts-node": "^10.9.1",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
import crypto from 'node:crypto'
|
import { describe, expect, test } from 'vitest'
|
||||||
Object.defineProperty(global, 'crypto', { value: { subtle: crypto.webcrypto.subtle }})
|
|
||||||
|
|
||||||
import { describe, expect, test } from '@jest/globals'
|
|
||||||
import jwt, { JwtAlgorithm } from '../src/index'
|
import jwt, { JwtAlgorithm } from '../src/index'
|
||||||
|
|
||||||
type Dataset = {
|
type Dataset = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { describe, expect, test } from '@jest/globals'
|
import { describe, expect, test } from 'vitest'
|
||||||
import {
|
import {
|
||||||
bytesToByteString,
|
bytesToByteString,
|
||||||
byteStringToBytes,
|
byteStringToBytes,
|
||||||
|
|||||||
9
vite.config.ts
Normal file
9
vite.config.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
test: {
|
||||||
|
environment: 'edge-runtime',
|
||||||
|
watch: false,
|
||||||
|
reporters: ['verbose']
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user