microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
c7f1165c059665e9baf0897641ef4f63773f36ed

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/test/debugger/setup.test.ts

18lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import * as fs from "fs";
5import * as path from "path";
6
7// source-map-support has a bug that crashes some of our tests. We fix it
8const moduleRelativeLocation = "../../../node_modules/source-map-support/source-map-support.js";
9const moduleLocation = path.join(__dirname, moduleRelativeLocation);
10const originalCode = "column -= 62;";
11const replacementCode = "if (column > 63) { column -= 62; }";
12const contents = fs.readFileSync(moduleLocation, "utf8");
13const fixedContents = contents.replace(originalCode, replacementCode);
14fs.writeFileSync(moduleLocation, fixedContents);
15
16// Then we load the module
17import * as sourceMapSupport from "source-map-support";
18sourceMapSupport.install(); // Enable stack traces translation to typescript