Skip to content

Commit fe9ddbb

Browse files
committed
bump bundlewatch.config.json
1 parent 15f03ae commit fe9ddbb

2 files changed

Lines changed: 16 additions & 15 deletions

File tree

‎packages/clerk-js/bundlewatch.config.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"files": [
33
{ "path": "./dist/clerk.js", "maxSize": "590kB" },
4-
{ "path": "./dist/clerk.browser.js", "maxSize": "73.5KB" },
4+
{ "path": "./dist/clerk.browser.js", "maxSize": "73.64KB" },
55
{ "path": "./dist/clerk.headless*.js", "maxSize": "55KB" },
66
{ "path": "./dist/ui-common*.js", "maxSize": "99KB" },
77
{ "path": "./dist/vendors*.js", "maxSize": "36KB" },

‎packages/shared/src/__tests__/jwtPayloadParser.test.ts‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { splitByScope } from '../authorization';
12
import { __experimental_JWTPayloadToAuthObjectProperties as JWTPayloadToAuthObjectProperties } from '../jwtPayloadParser';
23

34
const baseClaims = {
@@ -186,35 +187,35 @@ describe('JWTPayloadToAuthObjectProperties', () => {
186187

187188
describe('splitByScope ', () => {
188189
test('returns empty array when no features are present', () => {
189-
const { orgFeatures } = splitByScope('');
190-
expect(orgFeatures).toEqual([]);
190+
const { org } = splitByScope('');
191+
expect(org).toEqual([]);
191192
});
192193

193194
test('only org features included', () => {
194-
const { orgFeatures, userFeatures } = splitByScope('o:impersonation,o:payments');
195-
expect(orgFeatures).toEqual(['impersonation', 'payments']);
195+
const { org, user } = splitByScope('o:impersonation,o:payments');
196+
expect(org).toEqual(['impersonation', 'payments']);
196197

197-
expect(userFeatures).toEqual([]);
198+
expect(user).toEqual([]);
198199
});
199200

200201
test('only user features included', () => {
201-
const { orgFeatures, userFeatures } = splitByScope('u:impersonation,u:payments');
202-
expect(orgFeatures).toEqual([]);
202+
const { org, user } = splitByScope('u:impersonation,u:payments');
203+
expect(org).toEqual([]);
203204

204-
expect(userFeatures).toEqual(['impersonation', 'payments']);
205+
expect(user).toEqual(['impersonation', 'payments']);
205206
});
206207

207208
test('both org and user features included', () => {
208-
const { orgFeatures, userFeatures } = splitByScope('o:payments,u:impersonation');
209-
expect(orgFeatures).toEqual(['payments']);
209+
const { org, user } = splitByScope('o:payments,u:impersonation');
210+
expect(org).toEqual(['payments']);
210211

211-
expect(userFeatures).toEqual(['impersonation']);
212+
expect(user).toEqual(['impersonation']);
212213
});
213214

214215
test('features have multiple scopes', () => {
215-
const { orgFeatures, userFeatures } = splitByScope('ou:payments,u:impersonation');
216-
expect(orgFeatures).toEqual(['payments']);
216+
const { org, user } = splitByScope('ou:payments,u:impersonation');
217+
expect(org).toEqual(['payments']);
217218

218-
expect(userFeatures).toEqual(['payments', 'impersonation']);
219+
expect(user).toEqual(['payments', 'impersonation']);
219220
});
220221
});

0 commit comments

Comments
 (0)