File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,14 @@ export class DriversEndpoint extends Endpoint {
213
213
return this . client . getPagedItems ( '' )
214
214
}
215
215
216
+ /**
217
+ * List drivers in the default channel. (The default channel in this context is a channel
218
+ * that users do not need to subscribe to.)
219
+ */
220
+ public async listDefault ( ) : Promise < EdgeDriverSummary [ ] > {
221
+ return this . client . getPagedItems ( 'default' )
222
+ }
223
+
216
224
/**
217
225
* Uploads the zipped package represented by archiveData.
218
226
*/
Original file line number Diff line number Diff line change @@ -50,6 +50,15 @@ describe('DriversEndpoint', () => {
50
50
expect ( getPagedItemsSpy ) . toHaveBeenCalledWith ( '' )
51
51
} )
52
52
53
+ test ( 'listDefault' , async ( ) => {
54
+ const drivers = [ { driverId : 'listed-in-channel-id' } ] as EdgeDriverSummary [ ]
55
+ getPagedItemsSpy . mockResolvedValueOnce ( drivers )
56
+
57
+ expect ( await driversEndpoint . listDefault ( ) ) . toBe ( drivers )
58
+
59
+ expect ( getPagedItemsSpy ) . toHaveBeenCalledWith ( 'default' )
60
+ } )
61
+
53
62
test ( 'upload' , async ( ) => {
54
63
const driver = { driverId : 'driver-id' }
55
64
requestSpy . mockResolvedValueOnce ( driver )
You can’t perform that action at this time.
0 commit comments