mirror of
https://github.com/gpujs/gpu.js.git
synced 2025-12-08 20:35:56 +00:00
Also: feat: Typescript typings feat: api cleanup and exports feat: removal of building for node, only browser
17 lines
552 B
JavaScript
17 lines
552 B
JavaScript
const { assert, skip, test, module: describe } = require('qunit');
|
|
const { WebGLKernel } = require('../../src');
|
|
|
|
describe('issue # 270');
|
|
|
|
test('Issue #270 WebGlKernel getUniformLocation caches falsey - gpu', () => {
|
|
const canvas = {};
|
|
const context = {
|
|
getUniformLocation() {
|
|
throw new Error('tried to get getUniformLocation when falsey');
|
|
}
|
|
};
|
|
const kernel = new WebGLKernel('function() {}', { canvas, context });
|
|
kernel.programUniformLocationCache.test = false;
|
|
assert.equal(kernel.getUniformLocation('test'), false);
|
|
});
|