mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
test(toolkit): setup global crypto for tests
This commit is contained in:
parent
b685c9cb4e
commit
ed7d842517
3 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,7 @@ const config = {
|
|||
coverageReporters: ['text-summary', 'lcov'],
|
||||
coverageProvider: 'v8',
|
||||
roots: ['./lib'],
|
||||
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
||||
moduleNameMapper: {
|
||||
'^(chalk|inquirer)$': '<rootDir>/../../shared/lib/esm/module-proxy.js',
|
||||
},
|
||||
|
|
4
packages/toolkit/core-kit/jest.setup.js
Normal file
4
packages/toolkit/core-kit/jest.setup.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
import crypto from 'node:crypto';
|
||||
|
||||
// eslint-disable-next-line @silverhand/fp/no-mutation
|
||||
global.crypto = crypto;
|
|
@ -1,5 +1,3 @@
|
|||
import crypto from 'node:crypto';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
/** A word that used for password policy. */
|
||||
|
|
Loading…
Reference in a new issue