gpu.js/test/issues/270-cache.js
Robert Plummer 8bf362ad9a feat: No failing tests locally, only skipping and passing
Also:
feat: Typescript typings
feat: api cleanup and exports
feat: removal of building for node, only browser
2019-01-29 21:41:21 -05:00

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