11import * as assert from "assert" ;
22import { Uri } from "vscode" ;
33import { SyncDestination } from "../configuration/SyncDestination" ;
4+ import { ExtensionContext } from "vscode" ;
45
56import { CliWrapper } from "./CliWrapper" ;
7+ import { mock , spy } from "ts-mockito" ;
68
79describe ( __filename , ( ) => {
810 it ( "should create sync command" , ( ) => {
9- const cli = new CliWrapper ( ) ;
11+ const cli = new CliWrapper ( {
12+ asAbsolutePath ( path : string ) {
13+ return path ;
14+ } ,
15+ } as any ) ;
1016 const mapper = new SyncDestination (
1117 Uri . from ( {
1218 scheme : "dbws" ,
@@ -29,7 +35,11 @@ describe(__filename, () => {
2935 } ) ;
3036
3137 it ( "should create full sync command" , ( ) => {
32- const cli = new CliWrapper ( ) ;
38+ const cli = new CliWrapper ( {
39+ asAbsolutePath ( path : string ) {
40+ return path ;
41+ } ,
42+ } as any ) ;
3343 const mapper = new SyncDestination (
3444 Uri . from ( {
3545 scheme : "dbws" ,
@@ -52,7 +62,11 @@ describe(__filename, () => {
5262 } ) ;
5363
5464 it ( "should create an 'add profile' command" , ( ) => {
55- const cli = new CliWrapper ( ) ;
65+ const cli = new CliWrapper ( {
66+ asAbsolutePath ( path : string ) {
67+ return path ;
68+ } ,
69+ } as any ) ;
5670
5771 const { command, args} = cli . getAddProfileCommand (
5872 "DEFAULT" ,
@@ -61,7 +75,7 @@ describe(__filename, () => {
6175
6276 assert . equal (
6377 [ command , ...args ] . join ( " " ) ,
64- "databricks configure --profile DEFAULT --host https://databricks.com/ --token"
78+ "./bin/bricks configure --no-interactive --profile DEFAULT --host https://databricks.com/ --token"
6579 ) ;
6680 } ) ;
6781} ) ;
0 commit comments