forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.test.ts
More file actions
24 lines (22 loc) · 923 Bytes
/
api.test.ts
File metadata and controls
24 lines (22 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { expect } from 'chai';
import { PythonExtension } from '../client/api/types';
import { ProposedExtensionAPI } from '../client/proposedApiTypes';
import { initialize } from './initialize';
suite('Python API tests', () => {
let api: PythonExtension & ProposedExtensionAPI;
suiteSetup(async () => {
api = await initialize();
});
test('Active environment is defined', async () => {
const environmentPath = api.environments.getActiveEnvironmentPath();
const environment = await api.environments.resolveEnvironment(environmentPath);
expect(environment).to.not.equal(
undefined,
`Active environment is not defined, envPath: ${JSON.stringify(environmentPath)}, env: ${JSON.stringify(
environment,
)}`,
);
});
});