(value, settings)
| 4 | describe('WebGLFunctionNode.getVariableSignature()'); |
| 5 | |
| 6 | function run(value, settings) { |
| 7 | const node = new WebGLFunctionNode(`function fn() { |
| 8 | ${ value }; |
| 9 | }`, Object.assign({ output: [1, 2, 3] }, settings)); |
| 10 | |
| 11 | const ast = node.getJsAST(); |
| 12 | node.traceFunctionAST(ast); |
| 13 | assert.equal(ast.type, 'FunctionExpression'); |
| 14 | assert.equal(ast.body.type, 'BlockStatement'); |
| 15 | assert.equal(ast.body.body[0].type, 'VariableDeclaration'); |
| 16 | return node.astVariableDeclaration(ast.body.body[0], []).join(''); |
| 17 | } |
| 18 | |
| 19 | test('value float', () => { |
| 20 | assert.equal(run('const value = it', { |
no test coverage detected