-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Restore cell import sorting (#304) * Restore cell import sorting * Add tests * Update version and packages for recovery release
- Loading branch information
1 parent
b7512f8
commit f392edd
Showing
8 changed files
with
263 additions
and
217 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { assert } from 'chai'; | ||
import * as sinon from 'sinon'; | ||
import { getDocumentSelector } from '../../../../common/utilities'; | ||
import * as vscodeapi from '../../../../common/vscodeapi'; | ||
|
||
suite('Document Selector Tests', () => { | ||
let isVirtualWorkspaceStub: sinon.SinonStub; | ||
setup(() => { | ||
isVirtualWorkspaceStub = sinon.stub(vscodeapi, 'isVirtualWorkspace'); | ||
isVirtualWorkspaceStub.returns(false); | ||
}); | ||
teardown(() => { | ||
sinon.restore(); | ||
}); | ||
|
||
test('Document selector default', () => { | ||
const selector = getDocumentSelector(); | ||
assert.deepStrictEqual(selector, [ | ||
{ scheme: 'file', language: 'python' }, | ||
{ scheme: 'untitled', language: 'python' }, | ||
{ scheme: 'vscode-notebook', language: 'python' }, | ||
{ scheme: 'vscode-notebook-cell', language: 'python' }, | ||
]); | ||
}); | ||
test('Document selector virtual workspace', () => { | ||
isVirtualWorkspaceStub.returns(true); | ||
const selector = getDocumentSelector(); | ||
assert.deepStrictEqual(selector, [{ language: 'python' }]); | ||
}); | ||
}); |