microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/test/extension/reactDirManager.test.ts
22lines · 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 | // The module "assert" provides assertion methods from node |
| 5 | import * as assert from "assert"; |
| 6 | import * as path from "path"; |
| 7 | |
| 8 | import * as reactDirManager from "../../extension/reactDirManager"; |
| 9 | |
| 10 | suite("reactDirManager.ts", () => { |
| 11 | suite("extensionContext", function() { |
| 12 | suite("ReactDirPath", function() { |
| 13 | test("Should end with the correct path to the react folder", () => { |
| 14 | let reactPath = reactDirManager.ReactDirManager.ReactDirPath; |
| 15 | |
| 16 | assert.strictEqual(".react", path.basename(reactPath)); |
| 17 | reactPath = path.dirname(reactPath); |
| 18 | assert.strictEqual(".vscode", path.basename(reactPath)); |
| 19 | }); |
| 20 | }); |
| 21 | }); |
| 22 | }); |