chore(playground): clang-format

This commit is contained in:
Jason Choi
2016-08-05 09:56:53 -07:00
committed by Alex Rickabaugh
parent 0d1f3c3b07
commit 6baf3baedd
60 changed files with 3339 additions and 3375 deletions

View File

@ -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\'\)/);
});