chore(playground): clang-format
This commit is contained in:

committed by
Alex Rickabaugh

parent
0d1f3c3b07
commit
6baf3baedd
@ -38,19 +38,19 @@ describe('sourcemaps', function() {
|
||||
|
||||
|
||||
const content =
|
||||
fs.readFileSync('dist/all/playground/src/sourcemap/index.js').toString("utf8");
|
||||
const marker = "//# sourceMappingURL=data:application/json;base64,";
|
||||
fs.readFileSync('dist/all/playground/src/sourcemap/index.js').toString('utf8');
|
||||
const marker = '//# sourceMappingURL=data:application/json;base64,';
|
||||
const index = content.indexOf(marker);
|
||||
const sourceMapData =
|
||||
new Buffer(content.substring(index + marker.length), 'base64').toString("utf8");
|
||||
new Buffer(content.substring(index + marker.length), 'base64').toString('utf8');
|
||||
|
||||
var decoder = new sourceMap.SourceMapConsumer(JSON.parse(sourceMapData));
|
||||
|
||||
var originalPosition = decoder.originalPositionFor({line: errorLine, column: errorColumn});
|
||||
|
||||
var sourceCodeLines =
|
||||
fs.readFileSync('modules/playground/src/sourcemap/index.ts', {encoding: 'UTF-8'})
|
||||
.split('\n');
|
||||
var sourceCodeLines = fs.readFileSync('modules/playground/src/sourcemap/index.ts', {
|
||||
encoding: 'UTF-8'
|
||||
}).split('\n');
|
||||
expect(sourceCodeLines[originalPosition.line - 1])
|
||||
.toMatch(/throw new BaseException\(\'Sourcemap test\'\)/);
|
||||
});
|
||||
|
Reference in New Issue
Block a user