Browse Source

JavaScriptObfuscatorCLI: additional assets for source map file content

sanex3339 8 years ago
parent
commit
580df6dfa1
1 changed files with 7 additions and 0 deletions
  1. 7 0
      test/functional-tests/JavaScriptObfuscatorCLI.spec.ts

+ 7 - 0
test/functional-tests/JavaScriptObfuscatorCLI.spec.ts

@@ -103,6 +103,13 @@ describe('JavaScriptObfuscatorCLI', function (): void {
                 ]);
                 ]);
 
 
                 assert.equal(fs.existsSync(outputSourceMapPath), true);
                 assert.equal(fs.existsSync(outputSourceMapPath), true);
+
+                const content: string = fs.readFileSync(outputSourceMapPath, { encoding: 'utf8' }),
+                    sourceMap: any = JSON.parse(content);
+
+                assert.property(sourceMap, 'version');
+                assert.property(sourceMap, 'sources');
+                assert.property(sourceMap, 'names');
             });
             });
 
 
             afterEach(() => {
             afterEach(() => {