@@ -108,54 +108,45 @@ test('SeamHttp: merges axios headers when creating client', async (t) => {
108
108
t . is ( device . device_id , seed . august_device_1 )
109
109
} )
110
110
111
- // UPSTREAM: Fake does not support personal access token.
112
- // https://github.com/seamapi/fake-seam-connect/issues/126
113
- test . failing (
114
- 'SeamHttpMultiWorkspace: fromClient returns instance that uses client' ,
115
- async ( t ) => {
116
- const { endpoint } = await getTestServer ( t )
117
- const seam = SeamHttpMultiWorkspace . fromClient (
118
- SeamHttpMultiWorkspace . fromPersonalAccessToken ( 'seam_at_TODO' , {
119
- endpoint,
120
- } ) . client ,
121
- )
122
- const workspaces = await seam . workspaces . list ( )
123
- t . true ( workspaces . length > 0 )
124
- } ,
125
- )
111
+ test ( 'SeamHttpMultiWorkspace: fromClient returns instance that uses client' , async ( t ) => {
112
+ const { seed, endpoint } = await getTestServer ( t )
113
+ const seam = SeamHttpMultiWorkspace . fromClient (
114
+ SeamHttpMultiWorkspace . fromPersonalAccessToken ( seed . seam_at1_token , {
115
+ endpoint,
116
+ } ) . client ,
117
+ )
118
+ const workspaces = await seam . workspaces . list ( )
119
+ t . true ( workspaces . length > 0 )
120
+ } )
126
121
127
- // UPSTREAM: Fake does not support personal access token.
128
- // https://github.com/seamapi/fake-seam-connect/issues/126
129
- test . failing (
130
- 'SeamHttpMultiWorkspace: constructor returns instance that uses client' ,
131
- async ( t ) => {
132
- const { endpoint } = await getTestServer ( t )
133
- const seam = new SeamHttpMultiWorkspace ( {
134
- client : SeamHttpMultiWorkspace . fromPersonalAccessToken ( 'seam_at_TODO' , {
122
+ test ( 'SeamHttpMultiWorkspace: constructor returns instance that uses client' , async ( t ) => {
123
+ const { seed, endpoint } = await getTestServer ( t )
124
+ const seam = new SeamHttpMultiWorkspace ( {
125
+ client : SeamHttpMultiWorkspace . fromPersonalAccessToken (
126
+ seed . seam_at1_token ,
127
+ {
135
128
endpoint,
136
- } ) . client ,
137
- } )
138
- const workspaces = await seam . workspaces . list ( )
139
- t . true ( workspaces . length > 0 )
140
- } ,
141
- )
129
+ } ,
130
+ ) . client ,
131
+ } )
132
+ const workspaces = await seam . workspaces . list ( )
133
+ t . true ( workspaces . length > 0 )
134
+ } )
142
135
143
- // UPSTREAM: Fake does not support personal access token.
144
- // https://github.com/seamapi/fake-seam-connect/issues/126
145
- test . failing (
146
- 'SeamHttpMultiWorkspace: can use client to make requests' ,
147
- async ( t ) => {
148
- const { endpoint } = await getTestServer ( t )
149
- const seam = new SeamHttpMultiWorkspace ( {
150
- client : SeamHttpMultiWorkspace . fromPersonalAccessToken ( 'seam_at_TODO' , {
136
+ test ( 'SeamHttpMultiWorkspace: can use client to make requests' , async ( t ) => {
137
+ const { seed, endpoint } = await getTestServer ( t )
138
+ const seam = new SeamHttpMultiWorkspace ( {
139
+ client : SeamHttpMultiWorkspace . fromPersonalAccessToken (
140
+ seed . seam_at1_token ,
141
+ {
151
142
endpoint,
152
- } ) . client ,
153
- } )
154
- const {
155
- data : { workspaces } ,
156
- status ,
157
- } = await seam . client . get < WorkspacesListResponse > ( '/workspaces/list' )
158
- t . is ( status , 200 )
159
- t . true ( workspaces . length > 0 )
160
- } ,
161
- )
143
+ } ,
144
+ ) . client ,
145
+ } )
146
+ const {
147
+ data : { workspaces } ,
148
+ status ,
149
+ } = await seam . client . get < WorkspacesListResponse > ( '/workspaces/list' )
150
+ t . is ( status , 200 )
151
+ t . true ( workspaces . length > 0 )
152
+ } )
0 commit comments