Files
ComfyUI_frontend/tests-ui/afterSetup.ts
Chenlei Hu f4f0c960a3 Fix combo input default value (#242)
* Fix combo input default value

* Supress logs and fix failure
2024-07-27 22:17:42 -04:00

29 lines
708 B
TypeScript

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)
})