mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
22 lines
545 B
TypeScript
22 lines
545 B
TypeScript
// import { getSuites } from '../../../src/utils'
|
|
|
|
// const getCircularReplacer = () => {
|
|
// const seen = new WeakSet()
|
|
// return (key: any, value: any) => {
|
|
// if (typeof value === 'object' && value !== null) {
|
|
// if (seen.has(value))
|
|
// return
|
|
|
|
// seen.add(value)
|
|
// }
|
|
// return value
|
|
// }
|
|
// }
|
|
|
|
export const getSuitesAsJson = () => {
|
|
// const vitest = process.__vitest__
|
|
// const suites = getSuites(vitest.state.getFiles()).filter(x => x)
|
|
|
|
// return JSON.stringify(suites, getCircularReplacer())
|
|
}
|