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 4
4
*/
5
5
6
6
import assert from 'assert'
7
+ import * as FakeTimers from '@sinonjs/fake-timers'
7
8
import * as vscode from 'vscode'
8
9
import * as sinon from 'sinon'
9
10
import * 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'
11
12
import { FeatureConfigProvider } from 'aws-core-vscode/codewhisperer'
12
13
import { toTextEditor } from 'aws-core-vscode/test'
13
14
import { LspController } from 'aws-core-vscode/amazonq'
14
15
15
16
describe ( 'supplementalContextUtil' , function ( ) {
16
17
let testFolder : TestFolder
18
+ let clock : FakeTimers . InstalledClock
17
19
18
20
const fakeCancellationToken : vscode . CancellationToken = {
19
21
isCancellationRequested : false ,
20
22
onCancellationRequested : sinon . spy ( ) ,
21
23
}
22
24
25
+ before ( function ( ) {
26
+ clock = installFakeClock ( )
27
+ } )
28
+
29
+ after ( function ( ) {
30
+ clock . uninstall ( )
31
+ } )
32
+
23
33
beforeEach ( async function ( ) {
24
34
testFolder = await TestFolder . create ( )
25
35
sinon . stub ( FeatureConfigProvider . instance , 'getProjectContextGroup' ) . returns ( 'control' )
You can’t perform that action at this time.
0 commit comments