Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion editors/vscode/client/extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { deepStrictEqual, notEqual, strictEqual } from 'assert';
import { commands, extensions, window } from 'vscode';
import { commands, extensions, window, workspace } from 'vscode';

// const WORKSPACE_DIR = workspace.workspaceFolders![0].uri.toString();
// const filePath = WORKSPACE_DIR + '/debugger.js';
Expand Down Expand Up @@ -40,6 +40,17 @@ suite('commands', () => {
strictEqual(uri.toString(), 'output:oxc.oxc-vscode.Oxc');
});

test('oxc.toggleEnable', async () => {
const isEnabledBefore = workspace.getConfiguration('oxc').get<boolean>('enable');
strictEqual(isEnabledBefore, true);

await commands.executeCommand('oxc.toggleEnable');
await sleep(500);

const isEnabledAfter = workspace.getConfiguration('oxc').get<boolean>('enable');
strictEqual(isEnabledAfter, false);
});

// ToDo: check why this is not working,
// even with .gitignore deleted in th test_workspace
//
Expand Down