Add jest set/has pointer capture mocks (#1581)

* Add set/has pointer capter mocks

* Add mock impl.
This commit is contained in:
filtered
2024-11-18 13:41:37 +11:00
committed by GitHub
parent 8d4e740baa
commit f8e7058e19

View File

@@ -9,6 +9,9 @@ module.exports = async function () {
const { nop } = require('../utils/nopProxy')
global.enableWebGLCanvas = nop
global.window.HTMLElement.prototype.hasPointerCapture = jest.fn(() => true)
global.window.HTMLElement.prototype.setPointerCapture = jest.fn()
HTMLCanvasElement.prototype.getContext = nop
localStorage['Comfy.Settings.Comfy.Logging.Enabled'] = 'false'