Merge pull request #1395 from ethereum/fix_ast_check

remove node.kind check since this is not necessarily present in ast t…
pull/7/head
yann300 5 years ago committed by GitHub
commit 217a979c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      remix-tests/src/testRunner.ts

@ -35,7 +35,7 @@ function getAvailableFunctions (fileAST: AstNode, testContractName: string) {
if(fileAST.nodes && fileAST.nodes.length > 0) {
const contractAST: AstNode[] = fileAST.nodes.filter(node => node.name === testContractName && node.nodeType === 'ContractDefinition')
if(contractAST.length > 0 && contractAST[0].nodes) {
const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => node.kind === 'function' && node.nodeType === "FunctionDefinition")
const funcNodes: AstNode[] = contractAST[0].nodes.filter(node => ((node.kind === "function" && node.nodeType === "FunctionDefinition") || (node.nodeType === "FunctionDefinition")))
funcList = funcNodes.map(node => node.name)
}
}

Loading…
Cancel
Save