@@ -59,6 +59,7 @@ import { DbManager } from "../../../../src/databases/db-manager";
5959import { App } from "../../../../src/common/app" ;
6060import { ExtensionApp } from "../../../../src/common/vscode/vscode-app" ;
6161import { DbConfigStore } from "../../../../src/databases/config/db-config-store" ;
62+ import { mockedObject } from "../../utils/mocking.helpers" ;
6263
6364// up to 3 minutes per test
6465jest . setTimeout ( 3 * 60 * 1000 ) ;
@@ -992,10 +993,10 @@ describe("Variant Analysis Manager", () => {
992993
993994 showTextDocumentSpy = jest
994995 . spyOn ( window , "showTextDocument" )
995- . mockResolvedValue ( undefined as unknown as TextEditor ) ;
996+ . mockResolvedValue ( mockedObject < TextEditor > ( { } ) ) ;
996997 openTextDocumentSpy = jest
997998 . spyOn ( workspace , "openTextDocument" )
998- . mockResolvedValue ( undefined as unknown as TextDocument ) ;
999+ . mockResolvedValue ( mockedObject < TextDocument > ( { } ) ) ;
9991000 } ) ;
10001001
10011002 afterEach ( ( ) => {
@@ -1005,8 +1006,8 @@ describe("Variant Analysis Manager", () => {
10051006 it ( "opens the query text" , async ( ) => {
10061007 await variantAnalysisManager . openQueryText ( variantAnalysis . id ) ;
10071008
1008- expect ( showTextDocumentSpy ) . toHaveBeenCalledTimes ( 1 ) ;
10091009 expect ( openTextDocumentSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1010+ expect ( showTextDocumentSpy ) . toHaveBeenCalledTimes ( 1 ) ;
10101011
10111012 const uri : Uri = openTextDocumentSpy . mock . calls [ 0 ] [ 0 ] as Uri ;
10121013 expect ( uri . scheme ) . toEqual ( "codeql-variant-analysis" ) ;
@@ -1040,10 +1041,10 @@ describe("Variant Analysis Manager", () => {
10401041
10411042 showTextDocumentSpy = jest
10421043 . spyOn ( window , "showTextDocument" )
1043- . mockResolvedValue ( undefined as unknown as TextEditor ) ;
1044+ . mockResolvedValue ( mockedObject < TextEditor > ( { } ) ) ;
10441045 openTextDocumentSpy = jest
10451046 . spyOn ( workspace , "openTextDocument" )
1046- . mockResolvedValue ( undefined as unknown as TextDocument ) ;
1047+ . mockResolvedValue ( mockedObject < TextDocument > ( { } ) ) ;
10471048 } ) ;
10481049
10491050 afterEach ( ( ) => {
0 commit comments