microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
a3fd5ee9abdb16e41e4f03938cc208cec580e077

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/test/debugger/sourceMap.test.ts

21lines · 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 {SourceMapUtil} from "../../debugger/sourceMap";
5
6import * as assert from "assert";
7import * as path from "path";
8
9suite("sourceMap", function() {
10 suite("debuggerContext", function() {
11 test("should convert host filesystem paths to URL-style-paths", function() {
12 const sourceMap = new SourceMapUtil();
13 const filePath = path.join("foo", "bar", "baz");
14 const urlPath = "foo/bar/baz";
15 const result = (<any>sourceMap).makeUnixStylePath(filePath);
16 assert(result === urlPath, `Expected "${urlPath}", found "${result}`);
17 });
18
19 // TODO: This class definitely needs more tests
20 });
21});