@canva/cli 1.5.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canva/cli",
3
- "version": "1.5.2",
3
+ "version": "1.7.0",
4
4
  "description": "The official Canva CLI.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Canva Pty Ltd.",
@@ -7,7 +7,7 @@
7
7
  "author": "Canva Pty Ltd.",
8
8
  "dependencies": {
9
9
  "@canva/app-i18n-kit": "^1.1.1",
10
- "@canva/app-ui-kit": "^5.1.0",
10
+ "@canva/app-ui-kit": "^5.2.0",
11
11
  "@canva/asset": "^2.2.1",
12
12
  "@canva/design": "^2.7.3",
13
13
  "@canva/error": "^2.1.0",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@canva/app-components": "^2.1.0",
22
22
  "@canva/app-i18n-kit": "^1.1.1",
23
- "@canva/app-ui-kit": "^5.1.0",
23
+ "@canva/app-ui-kit": "^5.2.0",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.3",
26
26
  "@canva/error": "^2.1.0",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@canva/app-i18n-kit": "^1.1.1",
23
- "@canva/app-ui-kit": "^5.1.0",
23
+ "@canva/app-ui-kit": "^5.2.0",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.3",
26
26
  "@canva/error": "^2.1.0",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@canva/app-i18n-kit": "^1.1.1",
22
- "@canva/app-ui-kit": "^5.1.0",
22
+ "@canva/app-ui-kit": "^5.2.0",
23
23
  "@canva/asset": "^2.2.1",
24
24
  "@canva/design": "^2.7.3",
25
25
  "@canva/error": "^2.1.0",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@canva/app-i18n-kit": "^1.1.1",
23
- "@canva/app-ui-kit": "^5.1.0",
23
+ "@canva/app-ui-kit": "^5.2.0",
24
24
  "@canva/asset": "^2.2.1",
25
25
  "@canva/design": "^2.7.3",
26
26
  "@canva/error": "^2.1.0",
@@ -1,630 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-require-imports */
2
- import type { NextFunction, Request, Response } from "express";
3
- import type { DecodeOptions, Jwt, Secret, VerifyOptions } from "jsonwebtoken";
4
- import type { JwksClient, SigningKey } from "jwks-rsa";
5
- import type {
6
- createJwtMiddleware,
7
- GetTokenFromRequest,
8
- } from "../jwt_middleware";
9
-
10
- type Middleware = (req: Request, res: Response, next: NextFunction) => void;
11
-
12
- describe("createJwtMiddleware", () => {
13
- const FAKE_APP_ID = "AAAAAAAAAA1";
14
- const FAKE_BRAND_ID = "BAAAAAAAAA1";
15
- const FAKE_USER_ID = "UAAAAAAAAA1";
16
- const FAKE_JWKS_URI = "https://api.canva.com/rest/v1/apps/AAAAAAAAAA1/jwks";
17
-
18
- class FakeSigningKeyNotFoundError extends Error {}
19
- class FakeJsonWebTokenError extends Error {}
20
- class FakeTokenExpiredError extends Error {}
21
-
22
- let fakeGetTokenFromRequest: jest.MockedFn<GetTokenFromRequest>;
23
- let verify: jest.MockedFn<
24
- (
25
- token: string,
26
- secretOrPublicKey: Secret,
27
- options: VerifyOptions & { complete: true },
28
- ) => Jwt
29
- >;
30
- let decode: jest.MockedFn<
31
- (token: string, options: DecodeOptions & { complete: true }) => Jwt | null
32
- >;
33
-
34
- let getPublicKey: jest.MockedFn<() => string>;
35
- let getSigningKey: jest.MockedFn<
36
- (kid?: string | null | undefined) => Promise<SigningKey>
37
- >;
38
- let client: jest.Mocked<typeof JwksClient>;
39
-
40
- let req: Request;
41
- let res: Response;
42
- let next: jest.MockedFn<() => void>;
43
-
44
- let JWTAuthorizationError: typeof Error;
45
- let createJwtMiddlewareFn: typeof createJwtMiddleware;
46
- let jwtMiddleware: Middleware;
47
-
48
- beforeEach(() => {
49
- jest.resetAllMocks();
50
- jest.resetModules();
51
-
52
- fakeGetTokenFromRequest = jest.fn();
53
- verify = jest.fn();
54
- decode = jest.fn();
55
-
56
- getPublicKey = jest.fn().mockReturnValue("public-key");
57
- getSigningKey = jest.fn().mockResolvedValue({
58
- getPublicKey,
59
- });
60
-
61
- client = jest.fn().mockImplementation(() => ({
62
- getSigningKey,
63
- }));
64
-
65
- jest.doMock("jsonwebtoken", () => ({
66
- verify,
67
- decode,
68
- JsonWebTokenError: FakeJsonWebTokenError,
69
- TokenExpiredError: FakeTokenExpiredError,
70
- }));
71
-
72
- jest.doMock("jwks-rsa", () => ({
73
- JwksClient: client,
74
- SigningKeyNotFoundError: FakeSigningKeyNotFoundError,
75
- }));
76
-
77
- const jwtMiddlewareModule = require("../jwt_middleware");
78
- createJwtMiddlewareFn = jwtMiddlewareModule.createJwtMiddleware;
79
- JWTAuthorizationError = jwtMiddlewareModule.JWTAuthorizationError;
80
- });
81
-
82
- describe("Before called", () => {
83
- it("Creates a JwksClient", async () => {
84
- expect.assertions(3);
85
-
86
- expect(client).not.toHaveBeenCalled();
87
- jwtMiddleware = createJwtMiddlewareFn(
88
- FAKE_APP_ID,
89
- fakeGetTokenFromRequest,
90
- );
91
-
92
- expect(client).toHaveBeenCalledTimes(1);
93
- expect(client).toHaveBeenLastCalledWith({
94
- cache: true,
95
- cacheMaxAge: 3_600_000,
96
- timeout: 30_000,
97
- rateLimit: true,
98
- jwksUri: FAKE_JWKS_URI,
99
- });
100
- });
101
- });
102
-
103
- describe("When called", () => {
104
- beforeEach(() => {
105
- req = {
106
- header: (_name: string) => undefined,
107
- } as Request;
108
-
109
- res = {
110
- status: jest.fn().mockReturnThis(),
111
- json: jest.fn().mockReturnThis(),
112
- send: jest.fn().mockReturnThis(),
113
- } as unknown as Response;
114
-
115
- next = jest.fn();
116
-
117
- jwtMiddleware = createJwtMiddlewareFn(
118
- FAKE_APP_ID,
119
- fakeGetTokenFromRequest,
120
- );
121
- });
122
-
123
- describe("When `getTokenFromRequest` throws an exception ('Fake error')", () => {
124
- beforeEach(() => {
125
- fakeGetTokenFromRequest.mockRejectedValue(
126
- new JWTAuthorizationError("Fake error"),
127
- );
128
- });
129
-
130
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and message = "Fake error"`, async () => {
131
- expect.assertions(8);
132
-
133
- expect(fakeGetTokenFromRequest).not.toHaveBeenCalled();
134
- await jwtMiddleware(req, res, next);
135
-
136
- expect(fakeGetTokenFromRequest).toHaveBeenCalledTimes(1);
137
- expect(fakeGetTokenFromRequest).toHaveBeenLastCalledWith(req);
138
-
139
- expect(res.status).toHaveBeenCalledTimes(1);
140
- expect(res.status).toHaveBeenLastCalledWith(401);
141
-
142
- expect(res.json).toHaveBeenCalledTimes(1);
143
- expect(res.json).toHaveBeenLastCalledWith({
144
- error: "unauthorized",
145
- message: "Fake error",
146
- });
147
-
148
- expect(next).not.toHaveBeenCalled();
149
- });
150
- });
151
-
152
- describe("When the 'JWT doesn't have a key id", () => {
153
- beforeEach(() => {
154
- fakeGetTokenFromRequest.mockReturnValue("JWT");
155
-
156
- decode.mockReturnValue({
157
- header: {
158
- alg: "RS256",
159
- },
160
- payload: {},
161
- signature: "fake-signature",
162
- });
163
- });
164
-
165
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and no message`, async () => {
166
- expect.assertions(5);
167
-
168
- await jwtMiddleware(req, res, next);
169
-
170
- expect(res.status).toHaveBeenCalledTimes(1);
171
- expect(res.status).toHaveBeenLastCalledWith(401);
172
-
173
- expect(res.json).toHaveBeenCalledTimes(1);
174
- expect(res.json).toHaveBeenLastCalledWith({
175
- error: "unauthorized",
176
- });
177
-
178
- expect(next).not.toHaveBeenCalled();
179
- });
180
- });
181
-
182
- describe("When there's no public key with the provided key id", () => {
183
- beforeEach(() => {
184
- fakeGetTokenFromRequest.mockReturnValue("JWT");
185
-
186
- decode.mockReturnValue({
187
- header: {
188
- alg: "RS256",
189
- kid: "key1",
190
- },
191
- payload: {},
192
- signature: "fake-signature",
193
- });
194
-
195
- getSigningKey.mockRejectedValue(new FakeSigningKeyNotFoundError());
196
- });
197
-
198
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized"`, async () => {
199
- expect.assertions(5);
200
-
201
- await jwtMiddleware(req, res, next);
202
-
203
- expect(res.status).toHaveBeenCalledTimes(1);
204
- expect(res.status).toHaveBeenLastCalledWith(401);
205
-
206
- expect(res.json).toHaveBeenCalledTimes(1);
207
- expect(res.json).toHaveBeenLastCalledWith(
208
- expect.objectContaining({
209
- error: "unauthorized",
210
- }),
211
- );
212
-
213
- expect(next).not.toHaveBeenCalled();
214
- });
215
- });
216
-
217
- describe("When the middleware cannot verify the token", () => {
218
- beforeEach(() => {
219
- fakeGetTokenFromRequest.mockReturnValue("JWT");
220
-
221
- decode.mockReturnValue({
222
- header: {
223
- alg: "RS256",
224
- kid: "key1",
225
- },
226
- payload: {},
227
- signature: "fake-signature",
228
- });
229
-
230
- verify.mockImplementation(() => {
231
- throw new FakeJsonWebTokenError();
232
- });
233
- });
234
-
235
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and message = "Token is invalid"`, async () => {
236
- expect.assertions(5);
237
-
238
- await jwtMiddleware(req, res, next);
239
-
240
- expect(res.status).toHaveBeenCalledTimes(1);
241
- expect(res.status).toHaveBeenLastCalledWith(401);
242
-
243
- expect(res.json).toHaveBeenCalledTimes(1);
244
- expect(res.json).toHaveBeenLastCalledWith({
245
- error: "unauthorized",
246
- message: "Token is invalid",
247
- });
248
-
249
- expect(next).not.toHaveBeenCalled();
250
- });
251
- });
252
-
253
- describe("When the token has expired", () => {
254
- beforeEach(() => {
255
- fakeGetTokenFromRequest.mockReturnValue("JWT");
256
-
257
- decode.mockReturnValue({
258
- header: {
259
- alg: "RS256",
260
- kid: "key1",
261
- },
262
- payload: {},
263
- signature: "fake-signature",
264
- });
265
-
266
- verify.mockImplementation(() => {
267
- throw new FakeTokenExpiredError();
268
- });
269
- });
270
-
271
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and message = "Token expired"`, async () => {
272
- expect.assertions(5);
273
-
274
- await jwtMiddleware(req, res, next);
275
-
276
- expect(res.status).toHaveBeenCalledTimes(1);
277
- expect(res.status).toHaveBeenLastCalledWith(401);
278
-
279
- expect(res.json).toHaveBeenCalledTimes(1);
280
- expect(res.json).toHaveBeenLastCalledWith({
281
- error: "unauthorized",
282
- message: "Token expired",
283
- });
284
-
285
- expect(next).not.toHaveBeenCalled();
286
- });
287
- });
288
-
289
- describe("When the payload has no userId", () => {
290
- beforeEach(() => {
291
- fakeGetTokenFromRequest.mockReturnValue("JWT");
292
-
293
- decode.mockReturnValue({
294
- header: {
295
- alg: "RS256",
296
- kid: "key1",
297
- },
298
- payload: {},
299
- signature: "fake-signature",
300
- });
301
-
302
- verify.mockReturnValue({
303
- header: {
304
- alg: "RS256",
305
- },
306
- signature: "fake-signature",
307
- payload: {
308
- brandId: FAKE_BRAND_ID,
309
- aud: FAKE_APP_ID,
310
- },
311
- });
312
- });
313
-
314
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and no message`, async () => {
315
- expect.assertions(5);
316
-
317
- await jwtMiddleware(req, res, next);
318
-
319
- expect(res.status).toHaveBeenCalledTimes(1);
320
- expect(res.status).toHaveBeenLastCalledWith(401);
321
-
322
- expect(res.json).toHaveBeenCalledTimes(1);
323
- expect(res.json).toHaveBeenLastCalledWith({
324
- error: "unauthorized",
325
- });
326
-
327
- expect(next).not.toHaveBeenCalled();
328
- });
329
- });
330
-
331
- describe("When the payload has no brandId", () => {
332
- beforeEach(() => {
333
- fakeGetTokenFromRequest.mockReturnValue("JWT");
334
-
335
- decode.mockReturnValue({
336
- header: {
337
- alg: "RS256",
338
- kid: "key1",
339
- },
340
- payload: {},
341
- signature: "fake-signature",
342
- });
343
-
344
- verify.mockReturnValue({
345
- header: {
346
- alg: "RS256",
347
- },
348
- signature: "fake-signature",
349
- payload: {
350
- userId: FAKE_USER_ID,
351
- aud: FAKE_APP_ID,
352
- },
353
- });
354
- });
355
-
356
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and no message`, async () => {
357
- expect.assertions(5);
358
-
359
- await jwtMiddleware(req, res, next);
360
-
361
- expect(res.status).toHaveBeenCalledTimes(1);
362
- expect(res.status).toHaveBeenLastCalledWith(401);
363
-
364
- expect(res.json).toHaveBeenCalledTimes(1);
365
- expect(res.json).toHaveBeenLastCalledWith({
366
- error: "unauthorized",
367
- });
368
-
369
- expect(next).not.toHaveBeenCalled();
370
- });
371
- });
372
-
373
- describe("When the payload has no aud", () => {
374
- beforeEach(() => {
375
- fakeGetTokenFromRequest.mockReturnValue("JWT");
376
-
377
- decode.mockReturnValue({
378
- header: {
379
- alg: "RS256",
380
- kid: "key1",
381
- },
382
- payload: {},
383
- signature: "fake-signature",
384
- });
385
-
386
- verify.mockReturnValue({
387
- header: {
388
- alg: "RS256",
389
- },
390
- signature: "fake-signature",
391
- payload: {
392
- userId: FAKE_USER_ID,
393
- brandId: FAKE_BRAND_ID,
394
- },
395
- });
396
- });
397
-
398
- it(`Does not call next() and returns HTTP 401 with error = "unauthorized" and no message`, async () => {
399
- expect.assertions(5);
400
-
401
- await jwtMiddleware(req, res, next);
402
-
403
- expect(res.status).toHaveBeenCalledTimes(1);
404
- expect(res.status).toHaveBeenLastCalledWith(401);
405
-
406
- expect(res.json).toHaveBeenCalledTimes(1);
407
- expect(res.json).toHaveBeenLastCalledWith({
408
- error: "unauthorized",
409
- });
410
-
411
- expect(next).not.toHaveBeenCalled();
412
- });
413
- });
414
-
415
- describe("When the payload is valid", () => {
416
- beforeEach(() => {
417
- fakeGetTokenFromRequest.mockReturnValue("JWT");
418
-
419
- decode.mockReturnValue({
420
- header: {
421
- alg: "RS256",
422
- kid: "key1",
423
- },
424
- payload: {},
425
- signature: "fake-signature",
426
- });
427
-
428
- verify.mockReturnValue({
429
- header: {
430
- alg: "RS256",
431
- },
432
- signature: "fake-signature",
433
- payload: {
434
- userId: FAKE_USER_ID,
435
- brandId: FAKE_BRAND_ID,
436
- aud: FAKE_APP_ID,
437
- },
438
- });
439
- });
440
-
441
- it(`Sets the userId, brandId, and aud as appId in request.canva, and calls next()`, async () => {
442
- expect.assertions(4);
443
-
444
- await jwtMiddleware(req, res, next);
445
-
446
- expect(res.status).not.toHaveBeenCalled();
447
- expect(res.json).not.toHaveBeenCalled();
448
-
449
- expect(req["canva"]).toEqual({
450
- userId: FAKE_USER_ID,
451
- brandId: FAKE_BRAND_ID,
452
- appId: FAKE_APP_ID,
453
- });
454
- expect(next).toHaveBeenCalledTimes(1);
455
- });
456
- });
457
- });
458
- });
459
-
460
- describe("getTokenFromHttpHeader", () => {
461
- let getHeader: jest.MockedFn<(name: string) => string | undefined>;
462
- let req: Request;
463
- let getTokenFromHttpHeader: (req: Request) => string;
464
- let JWTAuthorizationError: typeof Error;
465
-
466
- beforeEach(() => {
467
- getHeader = jest.fn();
468
- req = {
469
- header: (name: string) => getHeader(name),
470
- } as Request;
471
-
472
- const jwtMiddlewareModule = require("../jwt_middleware");
473
- getTokenFromHttpHeader = jwtMiddlewareModule.getTokenFromHttpHeader;
474
- JWTAuthorizationError = jwtMiddlewareModule.JWTAuthorizationError;
475
- });
476
-
477
- describe("When the 'Authorization' header is missing", () => {
478
- beforeEach(() => {
479
- getHeader.mockReturnValue(undefined);
480
- });
481
-
482
- it(`Throws a JWTAuthorizationError with message = 'Missing the "Authorization" header'`, async () => {
483
- expect.assertions(3);
484
-
485
- expect(() => getTokenFromHttpHeader(req)).toThrow(
486
- new JWTAuthorizationError('Missing the "Authorization" header'),
487
- );
488
- expect(getHeader).toHaveBeenCalledTimes(1);
489
- expect(getHeader).toHaveBeenLastCalledWith("Authorization");
490
- });
491
- });
492
-
493
- describe("When the 'Authorization' header doesn't have a Bearer scheme", () => {
494
- beforeEach(() => {
495
- getHeader.mockReturnValue("Beerer FAKE_JWT");
496
- });
497
-
498
- it(`Throws a JWTAuthorizationError with message = 'Missing a "Bearer" token in the "Authorization" header''`, async () => {
499
- expect.assertions(3);
500
-
501
- expect(() => getTokenFromHttpHeader(req)).toThrow(
502
- new JWTAuthorizationError(
503
- 'Missing a "Bearer" token in the "Authorization" header',
504
- ),
505
- );
506
- expect(getHeader).toHaveBeenCalledTimes(1);
507
- expect(getHeader).toHaveBeenLastCalledWith("Authorization");
508
- });
509
- });
510
-
511
- describe("When the 'Authorization' Bearer scheme header doesn't have a token", () => {
512
- beforeEach(() => {
513
- getHeader.mockReturnValue("Bearer ");
514
- });
515
-
516
- it(`Throws a JWTAuthorizationError with message = 'Missing a "Bearer" token in the "Authorization" header'`, async () => {
517
- expect.assertions(3);
518
-
519
- expect(() => getTokenFromHttpHeader(req)).toThrow(
520
- new JWTAuthorizationError(
521
- 'Missing a "Bearer" token in the "Authorization" header',
522
- ),
523
- );
524
- expect(getHeader).toHaveBeenCalledTimes(1);
525
- expect(getHeader).toHaveBeenLastCalledWith("Authorization");
526
- });
527
- });
528
-
529
- describe("When the 'Authorization' Bearer scheme header has a token that does not match the JWT alphabet", () => {
530
- beforeEach(() => {
531
- getHeader.mockReturnValue("Bearer a*b%c");
532
- });
533
-
534
- it(`Throws a JWTAuthorizationError with message = 'Invalid "Bearer" token in the "Authorization" header'`, async () => {
535
- expect.assertions(3);
536
-
537
- expect(() => getTokenFromHttpHeader(req)).toThrow(
538
- new JWTAuthorizationError(
539
- 'Invalid "Bearer" token in the "Authorization" header',
540
- ),
541
- );
542
- expect(getHeader).toHaveBeenCalledTimes(1);
543
- expect(getHeader).toHaveBeenLastCalledWith("Authorization");
544
- });
545
- });
546
-
547
- describe("When the 'Authorization' Bearer scheme header has a token", () => {
548
- beforeEach(() => {
549
- getHeader.mockReturnValue("Bearer JWT");
550
- });
551
-
552
- it(`Returns the token`, async () => {
553
- expect.assertions(3);
554
-
555
- expect(getTokenFromHttpHeader(req)).toEqual("JWT");
556
- expect(getHeader).toHaveBeenCalledTimes(1);
557
- expect(getHeader).toHaveBeenLastCalledWith("Authorization");
558
- });
559
- });
560
- });
561
-
562
- describe("getTokenFromQueryString", () => {
563
- let req: Request;
564
- let getTokenFromQueryString: (req: Request) => string;
565
- let JWTAuthorizationError: typeof Error;
566
-
567
- beforeEach(() => {
568
- req = {
569
- query: {},
570
- } as Request;
571
-
572
- const jwtMiddlewareModule = require("../jwt_middleware");
573
- getTokenFromQueryString = jwtMiddlewareModule.getTokenFromQueryString;
574
- JWTAuthorizationError = jwtMiddlewareModule.JWTAuthorizationError;
575
- });
576
-
577
- describe("When the 'canva_user_token' query parameter is missing", () => {
578
- beforeEach(() => {
579
- delete req.query.canva_user_token;
580
- });
581
-
582
- it(`Throws a JWTAuthorizationError with message = 'Missing "canva_user_token" query parameter'`, async () => {
583
- expect.assertions(1);
584
-
585
- expect(() => getTokenFromQueryString(req)).toThrow(
586
- new JWTAuthorizationError('Missing "canva_user_token" query parameter'),
587
- );
588
- });
589
- });
590
-
591
- describe("When the 'canva_user_token' query parameter is not a string", () => {
592
- beforeEach(() => {
593
- req.query.canva_user_token = 10 as unknown as string;
594
- });
595
-
596
- it(`Throws a JWTAuthorizationError with message = 'Missing "canva_user_token" query parameter'`, async () => {
597
- expect.assertions(1);
598
-
599
- expect(() => getTokenFromQueryString(req)).toThrow(
600
- new JWTAuthorizationError('Missing "canva_user_token" query parameter'),
601
- );
602
- });
603
- });
604
-
605
- describe("When the 'canva_user_token' query parameter does not match the JWT alphabet", () => {
606
- beforeEach(() => {
607
- req.query.canva_user_token = "a*b%c";
608
- });
609
-
610
- it(`Throws a JWTAuthorizationError with message = 'Invalid "canva_user_token" query parameter'`, async () => {
611
- expect.assertions(1);
612
-
613
- expect(() => getTokenFromQueryString(req)).toThrow(
614
- new JWTAuthorizationError('Invalid "canva_user_token" query parameter'),
615
- );
616
- });
617
- });
618
-
619
- describe("When the 'canva_user_token' query parameter is a token", () => {
620
- beforeEach(() => {
621
- req.query.canva_user_token = "JWT";
622
- });
623
-
624
- it(`Returns the token`, async () => {
625
- expect.assertions(1);
626
-
627
- expect(getTokenFromQueryString(req)).toEqual("JWT");
628
- });
629
- });
630
- });