const {gl} = createContext(); const buf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buf); assertThrowsWith(() => { gl.vertexAttribPointer(0, 1, gl.BYE, false, 0, 0); // error }, [/argument.*?is undefined/]);