forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.unit.test.ts
More file actions
25 lines (20 loc) · 1.07 KB
/
extension.unit.test.ts
File metadata and controls
25 lines (20 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
// tslint:disable:no-any
import { expect } from 'chai';
import { buildApi } from '../client/api';
import { EXTENSION_ROOT_DIR } from '../client/common/constants';
const expectedPath = `${EXTENSION_ROOT_DIR.fileToCommandArgument()}/pythonFiles/ptvsd_launcher.py`;
suite('Extension API Debugger', () => {
test('Test debug launcher args (no-wait)', async () => {
const args = await buildApi(Promise.resolve()).debug.getRemoteLauncherCommand('something', 1234, false);
const expectedArgs = [expectedPath, '--default', '--host', 'something', '--port', '1234'];
expect(args).to.be.deep.equal(expectedArgs);
});
test('Test debug launcher args (wait)', async () => {
const args = await buildApi(Promise.resolve()).debug.getRemoteLauncherCommand('something', 1234, true);
const expectedArgs = [expectedPath, '--default', '--host', 'something', '--port', '1234', '--wait'];
expect(args).to.be.deep.equal(expectedArgs);
});
});