-
Notifications
You must be signed in to change notification settings - Fork 680
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix commented test case that might randomly fail (#902)
- Loading branch information
1 parent
c8f1f8e
commit 6956e07
Showing
1 changed file
with
13 additions
and
17 deletions.
There are no files selected for viewing
30 changes: 13 additions & 17 deletions
30
packages/foam-vscode/src/features/copy-without-brackets.spec.ts
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 |
---|---|---|
@@ -1,21 +1,17 @@ | ||
// import { env, window, Uri, Position, Selection, commands } from 'vscode'; | ||
// import * as vscode from 'vscode'; | ||
import { env, Position, Selection, commands } from 'vscode'; | ||
import { | ||
createFile, | ||
getUriInWorkspace, | ||
showInEditor, | ||
} from '../test/test-utils-vscode'; | ||
|
||
describe('copyWithoutBrackets', () => { | ||
it('should pass CI', () => { | ||
expect(true).toBe(true); | ||
it('should get the input from the active editor selection', async () => { | ||
const { uri } = await createFile('This is my [[test-content]].'); | ||
const { editor } = await showInEditor(uri); | ||
editor.selection = new Selection(new Position(0, 0), new Position(1, 0)); | ||
await commands.executeCommand('foam-vscode.copy-without-brackets'); | ||
const value = await env.clipboard.readText(); | ||
expect(value).toEqual('This is my Test Content.'); | ||
}); | ||
// it('should get the input from the active editor selection', async () => { | ||
// const doc = await vscode.workspace.openTextDocument( | ||
// Uri.parse('untitled:/hello.md') | ||
// ); | ||
// const editor = await window.showTextDocument(doc); | ||
// editor.edit(builder => { | ||
// builder.insert(new Position(0, 0), 'This is my [[test-content]].'); | ||
// }); | ||
// editor.selection = new Selection(new Position(0, 0), new Position(1, 0)); | ||
// await commands.executeCommand('foam-vscode.copy-without-brackets'); | ||
// const value = await env.clipboard.readText(); | ||
// expect(value).toEqual('This is my Test Content.'); | ||
// }); | ||
}); |