Skip to content

Commit

Permalink
fix supplementalContextUtil.test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-ShaoHua committed Dec 17, 2024
1 parent 04a5b68 commit 62b3e59
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,32 @@
*/

import assert from 'assert'
import * as FakeTimers from '@sinonjs/fake-timers'
import * as vscode from 'vscode'
import * as sinon from 'sinon'
import * as crossFile from 'aws-core-vscode/codewhisperer'
import { TestFolder, assertTabCount } from 'aws-core-vscode/test'
import { TestFolder, assertTabCount, installFakeClock } from 'aws-core-vscode/test'
import { FeatureConfigProvider } from 'aws-core-vscode/codewhisperer'
import { toTextEditor } from 'aws-core-vscode/test'
import { LspController } from 'aws-core-vscode/amazonq'

describe('supplementalContextUtil', function () {
let testFolder: TestFolder
let clock: FakeTimers.InstalledClock

const fakeCancellationToken: vscode.CancellationToken = {
isCancellationRequested: false,
onCancellationRequested: sinon.spy(),
}

before(function () {
clock = installFakeClock()
})

after(function () {
clock.uninstall()
})

beforeEach(async function () {
testFolder = await TestFolder.create()
sinon.stub(FeatureConfigProvider.instance, 'getProjectContextGroup').returns('control')
Expand Down

0 comments on commit 62b3e59

Please sign in to comment.