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 { aStringWithLineCount , createMockTextEditor } from 'aws-core-vscode/test'
11+ import { aStringWithLineCount , createMockTextEditor , installFakeClock } from 'aws-core-vscode/test'
1112import { FeatureConfigProvider , crossFileContextConfig } from 'aws-core-vscode/codewhisperer'
1213import {
1314 assertTabCount ,
@@ -30,6 +31,15 @@ describe('crossFileContextUtil', function () {
3031 }
3132
3233 let mockEditor : vscode . TextEditor
34+ let clock : FakeTimers . InstalledClock
35+
36+ before ( function ( ) {
37+ clock = installFakeClock ( )
38+ } )
39+
40+ after ( function ( ) {
41+ clock . uninstall ( )
42+ } )
3343
3444 afterEach ( function ( ) {
3545 sinon . restore ( )
@@ -313,8 +323,8 @@ describe('crossFileContextUtil', function () {
313323
314324 describe ( 'full support' , function ( ) {
315325 // TODO: fix it
316- // const fileExtLists = ['java', 'js', 'ts', 'py', 'tsx', 'jsx']
317- const fileExtLists = [ 'java' ]
326+ const fileExtLists = [ 'java' , 'js' , 'ts' , 'py' , 'tsx' , 'jsx' ]
327+ // const fileExtLists = ['java']
318328
319329 before ( async function ( ) {
320330 this . timeout ( 60000 )
0 commit comments