Browse Source

JavaScriptObfuscatorCLI: additional assets for source map file content

sanex3339 8 năm trước cách đây
mục cha
commit
580df6dfa1
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  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);
+
+                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(() => {