NodeUtils tests update

This commit is contained in:
sanex3339
2016-06-18 16:30:13 +03:00
parent c35b6abcda
commit 2889856d59
3 changed files with 106 additions and 23 deletions
+1 -1
View File
@@ -142,6 +142,6 @@ export class NodeUtils {
* @returns {boolean}
*/
private static validateNode (node: INode): boolean {
return !!node;
return !!node && node.hasOwnProperty('type');
}
}
+8
View File
@@ -0,0 +1,8 @@
import { IBlockStatementNode } from "./IBlockStatementNode";
import { INode } from "./INode";
export interface IIfStatementNode extends INode {
test: any,
consequent: IBlockStatementNode,
alternate: IBlockStatementNode
}