@@ -4,6 +4,9 @@ import * as contextproviders from '../../lib/context-providers';
44import { Context , TRANSIENT_CONTEXT_KEY } from '../../lib/api/context' ;
55import { MockSdkProvider , setDefaultSTSMocks } from '../util/mock-sdk' ;
66
7+ const ioHost = new TestIoHost ( ) ;
8+ const ioHelper = ioHost . asHelper ( ) ;
9+
710const mockSDK = new MockSdkProvider ( ) ;
811setDefaultSTSMocks ( ) ;
912
@@ -22,7 +25,7 @@ test('errors are reported into the context value', async () => {
2225 // WHEN
2326 await contextproviders . provideContextValues ( [
2427 { key : 'asdf' , props : { account : '1234' , region : 'us-east-1' } , provider : TEST_PROVIDER } ,
25- ] , context , mockSDK ) ;
28+ ] , context , mockSDK , ioHelper ) ;
2629
2730 // THEN - error is now in context
2831
@@ -59,7 +62,7 @@ test('lookup role ARN is resolved', async () => {
5962 } ,
6063 provider : TEST_PROVIDER ,
6164 } ,
62- ] , context , mockSDK ) ;
65+ ] , context , mockSDK , ioHelper ) ;
6366
6467 // THEN - Value gets resolved
6568 expect ( context . get ( 'asdf' ) ) . toEqual ( 'some resolved value' ) ;
@@ -77,7 +80,7 @@ test('errors are marked transient', async () => {
7780 // WHEN
7881 await contextproviders . provideContextValues ( [
7982 { key : 'asdf' , props : { account : '1234' , region : 'us-east-1' } , provider : TEST_PROVIDER } ,
80- ] , context , mockSDK ) ;
83+ ] , context , mockSDK , ioHelper ) ;
8184
8285 // THEN - error is marked transient
8386 expect ( context . get ( 'asdf' ) [ TRANSIENT_CONTEXT_KEY ] ) . toBeTruthy ( ) ;
@@ -98,7 +101,7 @@ test('context provider can be registered using PluginHost', async () => {
98101 // WHEN
99102 await contextproviders . provideContextValues ( [
100103 { key : 'asdf' , props : { account : '1234' , region : 'us-east-1' , pluginName : 'prov' } , provider : PLUGIN_PROVIDER } ,
101- ] , context , mockSDK ) ;
104+ ] , context , mockSDK , ioHelper ) ;
102105
103106 // THEN - error is marked transient
104107 expect ( called ) . toEqual ( true ) ;
@@ -116,7 +119,7 @@ test('plugin context provider can be called without account/region', async () =>
116119 // WHEN
117120 await contextproviders . provideContextValues ( [
118121 { key : 'asdf' , props : { banana : 'yellow' , pluginName : 'prov' } as any , provider : PLUGIN_PROVIDER } ,
119- ] , context , mockSDK ) ;
122+ ] , context , mockSDK , ioHelper ) ;
120123
121124 // THEN - error is marked transient
122125 expect ( context . get ( 'asdf' ) ) . toEqual ( 'yay' ) ;
0 commit comments