diff --git a/packages/core/src/test/codewhisperer/commands/basicCommands.test.ts b/packages/core/src/test/codewhisperer/commands/basicCommands.test.ts index ac8a5e5969f..ee6aa81bbe0 100644 --- a/packages/core/src/test/codewhisperer/commands/basicCommands.test.ts +++ b/packages/core/src/test/codewhisperer/commands/basicCommands.test.ts @@ -88,6 +88,12 @@ describe('CodeWhisperer-basicCommands', function () { codeSuggestionsState = new TestCodeSuggestionsState() }) + after(async function () { + // disable auto scan after testrun + await CodeScansState.instance.setScansEnabled(false) + assert.strictEqual(CodeScansState.instance.isScansEnabled(), false) + }) + it('has suggestions enabled by default', async function () { targetCommand = testCommand(toggleCodeSuggestions, codeSuggestionsState) assert.strictEqual(codeSuggestionsState.isSuggestionsEnabled(), true) @@ -495,12 +501,6 @@ describe('CodeWhisperer-basicCommands', function () { sandbox.restore() }) - after(async function () { - // disable auto scan after testrun - await CodeScansState.instance.setScansEnabled(false) - assert.strictEqual(CodeScansState.instance.isScansEnabled(), false) - }) - it('should call applySecurityFix command successfully', async function () { const fileName = 'sample.py' const textDocumentMock = createMockDocument('first line\n second line\n fourth line', fileName)