diff --git a/src/sources/webgl.test.ts b/src/sources/webgl.test.ts index f49bbf5..b195f1d 100644 --- a/src/sources/webgl.test.ts +++ b/src/sources/webgl.test.ts @@ -1,8 +1,15 @@ +import { isHeadlessChrome } from '../../tests/utils' +import { BotdError } from '../types' import getWebGL from './webgl' describe('Sources', () => { describe('webgl', () => { it('returns expected values or throws', () => { + if (isHeadlessChrome()) { + expect(() => getWebGL()).toThrow(new BotdError(-4, 'WebGLRenderingContext is null')) + return + } + const result = getWebGL() expect(typeof result.renderer).toBe('string')