File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/amazonq/test/unit/codewhisperer/util Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44 */
55
66import assert from 'assert'
7+ import * as FakeTimers from '@sinonjs/fake-timers'
78import * as vscode from 'vscode'
89import * as sinon from 'sinon'
910import * as crossFile from 'aws-core-vscode/codewhisperer'
10- import { TestFolder , assertTabCount } from 'aws-core-vscode/test'
11+ import { TestFolder , assertTabCount , installFakeClock } from 'aws-core-vscode/test'
1112import { FeatureConfigProvider } from 'aws-core-vscode/codewhisperer'
1213import { toTextEditor } from 'aws-core-vscode/test'
1314import { LspController } from 'aws-core-vscode/amazonq'
1415
1516describe ( 'supplementalContextUtil' , function ( ) {
1617 let testFolder : TestFolder
18+ let clock : FakeTimers . InstalledClock
1719
1820 const fakeCancellationToken : vscode . CancellationToken = {
1921 isCancellationRequested : false ,
2022 onCancellationRequested : sinon . spy ( ) ,
2123 }
2224
25+ before ( function ( ) {
26+ clock = installFakeClock ( )
27+ } )
28+
29+ after ( function ( ) {
30+ clock . uninstall ( )
31+ } )
32+
2333 beforeEach ( async function ( ) {
2434 testFolder = await TestFolder . create ( )
2535 sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . returns ( 'control' )
You can’t perform that action at this time.
0 commit comments