mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
0.14.1 Temporary fix for wrong esprima template-literal parsing
This commit is contained in:
+2
-2
@@ -48,7 +48,7 @@ describe('TemplateLiteralTransformer', () => {
|
||||
}
|
||||
);
|
||||
|
||||
assert.match(obfuscationResult.getObfuscatedCode(), /return *'foo\\x0abar';$/);
|
||||
assert.match(obfuscationResult.getObfuscatedCode(), /{ *return *'foo\\x0abar'; *}$/);
|
||||
});
|
||||
|
||||
it('variant #3: should transform es6 multiline template literal inside return statement', () => {
|
||||
@@ -61,7 +61,7 @@ describe('TemplateLiteralTransformer', () => {
|
||||
}
|
||||
);
|
||||
|
||||
assert.match(obfuscationResult.getObfuscatedCode(), /return *'foo\\x0abar';$/);
|
||||
assert.match(obfuscationResult.getObfuscatedCode(), /case *!!\[] *: *return *'foo\\x0abar'; *} *}$/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ describe('NodeUtils', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getNextSiblingStatementNode (node: ESTree.Statement): ESTree.Node | null', () => {
|
||||
describe('getNextSiblingStatementNode (node: ESTree.Statement): TStatement | null', () => {
|
||||
describe('variant #1: block statement node as scope node', () => {
|
||||
let statementNode1: ESTree.Statement,
|
||||
statementNode2: ESTree.Statement,
|
||||
@@ -379,7 +379,7 @@ describe('NodeUtils', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getPreviousSiblingStatementNode (node: ESTree.Statement): ESTree.Node | null', () => {
|
||||
describe('getPreviousSiblingStatementNode (node: ESTree.Statement): TStatement | null', () => {
|
||||
describe('variant #1: block statement node as scope node', () => {
|
||||
let statementNode1: ESTree.Statement,
|
||||
statementNode2: ESTree.Statement,
|
||||
|
||||
Reference in New Issue
Block a user