(FunctionNode)
| 37 | describe('internal: function composition FunctionNode'); |
| 38 | |
| 39 | function functionCompositionFunctionNode(FunctionNode) { |
| 40 | const output = [1]; |
| 41 | const node = new FunctionNode(`function kernel() { |
| 42 | function inner() { return 1; } |
| 43 | |
| 44 | return inner(); |
| 45 | }`, { |
| 46 | output, |
| 47 | onNestedFunction: sinon.spy(), |
| 48 | lookupReturnType: () => 'Number', |
| 49 | lookupFunctionArgumentTypes: () => {} |
| 50 | }); |
| 51 | |
| 52 | const string = node.toString(); |
| 53 | assert.equal(node.onNestedFunction.callCount, 1); |
| 54 | return string; |
| 55 | } |
| 56 | |
| 57 | test('CPUFunctionNode', () => { |
| 58 | assert.equal(functionCompositionFunctionNode(CPUFunctionNode), 'function kernel() {' |
no test coverage detected
searching dependent graphs…