File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
lambdas/backend-client/src/__tests__ Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -6,16 +6,17 @@ import { ITemplateClient } from '../types/template-client';
66jest . mock ( '../template-api-client' ) ;
77
88const templatesApiMock = mockDeep < ITemplateClient > ( ) ;
9+ const testToken = '000' ;
910
1011describe ( 'BackendAPIClient' , ( ) => {
1112 test ( 'should default to concrete implementation' , async ( ) => {
12- BackendClient ( 'token' ) ;
13+ BackendClient ( testToken ) ;
1314
14- expect ( TemplateApiClient ) . toHaveBeenCalledWith ( 'token' ) ;
15+ expect ( TemplateApiClient ) . toHaveBeenCalledWith ( testToken ) ;
1516 } ) ;
1617
1718 test ( 'should use passed in clients' , async ( ) => {
18- const client = new BackendApiClient ( 'token' , templatesApiMock ) ;
19+ const client = new BackendApiClient ( testToken , templatesApiMock ) ;
1920
2021 expect ( client . templates ) . toBe ( templatesApiMock ) ;
2122 } ) ;
Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5- npm run copy-files-for-testing
6-
75npm run create-test-user
86
97npm run build --prefix frontend
You can’t perform that action at this time.
0 commit comments