Skip to content

Commit 9a2c1c6

Browse files
committed
chore: clean up test
1 parent 7c319e8 commit 9a2c1c6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

integration/tests/protect-service.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const mockProtectSettings = async (page: Page, config?: ProtectConfigJSON) => {
1111
const json = await response.json();
1212
const newJson = {
1313
...json,
14-
protect_config: config,
14+
...(config ? { protect_config: config } : {}),
1515
};
1616
await route.fulfill({ response, json: newJson });
1717
});
1818
};
1919

20-
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('Clerk Protect checks', ({ app }) => {
20+
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('Clerk Protect checks @generic', ({ app }) => {
2121
test.describe.configure({ mode: 'parallel' });
2222

2323
test.afterAll(async () => {
@@ -37,14 +37,17 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('Clerk Pro
3737
});
3838
await u.page.goToAppHome();
3939
await u.page.waitForClerkJsLoaded();
40+
4041
await expect(page.locator('#test-protect-loader')).toHaveAttribute('type', 'module');
4142
});
4243

4344
test('should not create loader element when protect_config.loader is not set', async ({ page, context }) => {
4445
const u = createTestUtils({ app, page, context });
45-
await mockProtectSettings(page, undefined);
46+
await mockProtectSettings(page);
4647
await u.page.goToAppHome();
4748
await u.page.waitForClerkJsLoaded();
48-
expect(page.locator('#test-protect-loader')).toBeUndefined();
49+
50+
// Playwright locators are always objects, never undefined
51+
await expect(page.locator('#test-protect-loader')).toHaveCount(0);
4952
});
5053
});

packages/clerk-js/bundlewatch.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{ "path": "./dist/clerk.browser.js", "maxSize": "81KB" },
55
{ "path": "./dist/clerk.channel.browser.js", "maxSize": "81KB" },
66
{ "path": "./dist/clerk.legacy.browser.js", "maxSize": "123KB" },
7-
{ "path": "./dist/clerk.headless*.js", "maxSize": "63.2KB" },
7+
{ "path": "./dist/clerk.headless*.js", "maxSize": "65KB" },
88
{ "path": "./dist/ui-common*.js", "maxSize": "117.1KB" },
99
{ "path": "./dist/ui-common*.legacy.*.js", "maxSize": "120KB" },
1010
{ "path": "./dist/vendors*.js", "maxSize": "47KB" },

0 commit comments

Comments
 (0)