forked from javascript-obfuscator/javascript-obfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceCode.spec.ts
More file actions
39 lines (29 loc) · 1.08 KB
/
Copy pathSourceCode.spec.ts
File metadata and controls
39 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import 'reflect-metadata';
import { assert } from 'chai';
import { SourceCode } from '../../../src/source-code/SourceCode';
describe('SourceCode', () => {
describe('getSourceCode', () => {
describe('should return source code', () => {
const expectedSourceCode: string = 'var test = 1;';
let sourceCode: string;
before(() => {
sourceCode = new SourceCode(expectedSourceCode, 'test').getSourceCode();
});
it('should return source code', () => {
assert.equal(sourceCode, expectedSourceCode);
});
});
});
describe('getSourceMap', () => {
describe('should return source map', () => {
const expectedSourceMap: string = 'test';
let sourceMap: string;
before(() => {
sourceMap = new SourceCode('var test = 1;', expectedSourceMap).getSourceMap();
});
it('should return source map', () => {
assert.equal(sourceMap, expectedSourceMap);
});
});
});
});