microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
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 | |
| 4 | import {SourceMapUtil} from "../../debugger/sourceMap"; |
| 5 | |
| 6 | import * as assert from "assert"; |
| 7 | import * as path from "path"; |
| 8 | |
| 9 | suite("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 | }); |