You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
// The tests of src/lib. Vitest prefers this file to vite.config.ts, the
|
|
// SvelteKit configuration of the page, so the library tests run without the
|
|
// SvelteKit plugin; the page helpers in src/lib/inspector import the library
|
|
// by relative paths and need no $lib alias.
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: ['src/**/*.test.ts'],
|
|
// BLS12-381 point checks and the 65 536-extension cases take a moment.
|
|
testTimeout: 30_000,
|
|
coverage: {
|
|
provider: 'v8',
|
|
include: ['src/lib/dkc/**/*.ts', 'src/lib/inspector/**/*.ts'],
|
|
exclude: ['src/lib/**/*.test.ts', 'src/lib/dkc/testing/**', 'src/lib/dkc/index.ts'],
|
|
reporter: ['text', 'html', 'json-summary'],
|
|
thresholds: {
|
|
// The codec is covered completely (plan §7), and so are the IBE and
|
|
// the release verification (plan of phase 2, section 10, steps 3
|
|
// and 4).
|
|
'src/lib/dkc/cbor.ts': { 100: true },
|
|
'src/lib/dkc/ibe.ts': { 100: true },
|
|
'src/lib/dkc/release.ts': { 100: true },
|
|
// The stanza X25519 and its Bech32 identities (step 5).
|
|
'src/lib/dkc/x25519.ts': { 100: true },
|
|
'src/lib/dkc/bech32.ts': { 100: true },
|
|
'src/lib/dkc/digest.ts': { 100: true },
|
|
'src/lib/dkc/**/*.ts': { statements: 95, branches: 90, functions: 95, lines: 95 },
|
|
// The page model and helpers of the inspector (plan §8, phase 1).
|
|
'src/lib/inspector/**/*.ts': { statements: 95, branches: 90, functions: 95, lines: 95 },
|
|
},
|
|
},
|
|
},
|
|
});
|