mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
Split jest tests into fast and slow groups (#1401)
This commit is contained in:
28
tests-ui/tests/afterSetup.ts
Normal file
28
tests-ui/tests/afterSetup.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { start } from '../utils'
|
||||
import lg from '../utils/litegraph'
|
||||
|
||||
// Load things once per test file before to ensure its all warmed up for the tests
|
||||
beforeAll(async () => {
|
||||
const originalWarn = console.warn
|
||||
console.error = function (...args) {
|
||||
if (['Error: Not implemented: window.alert'].includes(args[0])) {
|
||||
return
|
||||
}
|
||||
}
|
||||
console.warn = function (...args) {
|
||||
if (
|
||||
[
|
||||
"sMethod=='pointer' && !window.PointerEvent",
|
||||
'Warning, nodes missing on pasting'
|
||||
].includes(args[0])
|
||||
) {
|
||||
return
|
||||
}
|
||||
originalWarn.apply(console, args)
|
||||
}
|
||||
console.log = function (...args) {}
|
||||
|
||||
lg.setup(global)
|
||||
await start({ resetEnv: true })
|
||||
lg.teardown(global)
|
||||
})
|
||||
Reference in New Issue
Block a user