mirror of
https://github.com/gpujs/gpu.js.git
synced 2025-12-08 20:35:56 +00:00
Add unit tests to browser all.html fix a typo in file and in desc Add a few missing items to index.d.ts Move debug console.log to match GPU counterpart Build files All unit tests pass or skip (when appropriate) for Chrome, Firefox, Safari, and Node This marks v1 rc1.
37 lines
824 B
JavaScript
37 lines
824 B
JavaScript
const { assert, test, module: describe, only } = require('qunit');
|
|
const { FunctionNode } = require(process.cwd() + '/src');
|
|
|
|
describe('FunctionNode.isSafeDependencies()');
|
|
|
|
test('calls if dependencies are falsey, returns true', () => {
|
|
assert.equal(FunctionNode.prototype.isSafeDependencies(null), true);
|
|
});
|
|
|
|
test('calls if dependencies have all isSafe that are true, returns true', () => {
|
|
assert.equal(FunctionNode.prototype.isSafeDependencies([
|
|
{
|
|
isSafe: true
|
|
},
|
|
{
|
|
isSafe: true
|
|
},
|
|
{
|
|
isSafe: true
|
|
}
|
|
]), true);
|
|
});
|
|
|
|
test('calls if dependencies have any isSafe that are false, returns false', () => {
|
|
assert.equal(FunctionNode.prototype.isSafeDependencies([
|
|
{
|
|
isSafe: true
|
|
},
|
|
{
|
|
isSafe: false
|
|
},
|
|
{
|
|
isSafe: true
|
|
}
|
|
]), false);
|
|
});
|