diff --git a/editors/vscode/client/extension.spec.ts b/editors/vscode/client/extension.spec.ts index a55e9b3745a07..7eaa7887ffb4a 100644 --- a/editors/vscode/client/extension.spec.ts +++ b/editors/vscode/client/extension.spec.ts @@ -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'; @@ -40,6 +40,17 @@ suite('commands', () => { strictEqual(uri.toString(), 'output:oxc.oxc-vscode.Oxc'); }); + test('oxc.toggleEnable', async () => { + const isEnabledBefore = workspace.getConfiguration('oxc').get('enable'); + strictEqual(isEnabledBefore, true); + + await commands.executeCommand('oxc.toggleEnable'); + await sleep(500); + + const isEnabledAfter = workspace.getConfiguration('oxc').get('enable'); + strictEqual(isEnabledAfter, false); + }); + // ToDo: check why this is not working, // even with .gitignore deleted in th test_workspace //