microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.1.2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/test/debugger/sourceMap.test.ts

21lines · modeblame

3c2eeb5cJimmy Thomson10 years ago1// 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";
81226dceJimmy Thomson10 years ago7import * as path from "path";
3c2eeb5cJimmy Thomson10 years ago8
9suite("sourceMap", function() {
10suite("debuggerContext", function() {
81226dceJimmy Thomson10 years ago11test("should convert host filesystem paths to URL-style-paths", function() {
3c2eeb5cJimmy Thomson10 years ago12const sourceMap = new SourceMapUtil();
81226dceJimmy Thomson10 years ago13const filePath = path.join("foo", "bar", "baz");
14const urlPath = "foo/bar/baz";
15const result = (<any>sourceMap).makeUnixStylePath(filePath);
16assert(result === urlPath, `Expected "${urlPath}", found "${result}`);
3c2eeb5cJimmy Thomson10 years ago17});
81226dceJimmy Thomson10 years ago18
19// TODO: This class definitely needs more tests
3c2eeb5cJimmy Thomson10 years ago20});
21});