mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
FunctionDeclarationNode tests + tests source maps fix
This commit is contained in:
@@ -45,13 +45,14 @@ export class NodeMocks {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param functionName
|
||||
* @param blockStatementNode
|
||||
* @returns {IFunctionDeclarationNode}
|
||||
*/
|
||||
public static getFunctionDeclarationNode (blockStatementNode: IBlockStatementNode): IFunctionDeclarationNode {
|
||||
public static getFunctionDeclarationNode (functionName: string, blockStatementNode: IBlockStatementNode): IFunctionDeclarationNode {
|
||||
return {
|
||||
type: NodeType.FunctionDeclaration,
|
||||
id: NodeMocks.getIdentifierNode('test'),
|
||||
id: NodeMocks.getIdentifierNode(functionName),
|
||||
params: [],
|
||||
body: blockStatementNode,
|
||||
generator: false,
|
||||
|
||||
Reference in New Issue
Block a user