Skip to content

Commit fa81977

Browse files
committed
test: update tests
1 parent 933db32 commit fa81977

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

integration/tests/next-build.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ function getIndicator(buildOutput: string, type: 'Static' | 'Dynamic') {
2424
}
2525

2626
test.describe('next build - provider as client component @nextjs', () => {
27-
test.skip(() => !process.env.CI, 'Skipping on local runs');
28-
2927
test.describe.configure({ mode: 'parallel' });
3028
let app: Application;
3129

@@ -104,8 +102,6 @@ export default function RootLayout({ children }: { children: React.ReactNode })
104102
});
105103

106104
test.describe('next build - dynamic options @nextjs', () => {
107-
test.skip(() => !process.env.CI, 'Skipping on local runs');
108-
109105
test.describe.configure({ mode: 'parallel' });
110106
let app: Application;
111107

packages/clerk-js/src/ui/components/SignIn/__tests__/SignInStart.test.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ import { SignInStart } from '../SignInStart';
1414
const { createFixtures } = bindCreateFixtures('SignIn');
1515

1616
describe('SignInStart', () => {
17-
const originalWindow = window;
17+
const originalGetComputedStyle = window.getComputedStyle;
18+
const originalLocation = window.location;
19+
const originalHistory = window.history;
1820
const mockGetComputedStyle = jest.fn();
1921

2022
beforeEach(() => {
@@ -28,14 +30,26 @@ describe('SignInStart', () => {
2830
Object.defineProperty(window, 'getComputedStyle', {
2931
value: mockGetComputedStyle,
3032
writable: true,
33+
configurable: true,
3134
});
3235
});
3336

3437
afterEach(() => {
35-
// Restore window
36-
Object.defineProperty(global, 'window', {
37-
value: originalWindow,
38+
// Restore patched globals
39+
Object.defineProperty(window, 'getComputedStyle', {
40+
value: originalGetComputedStyle,
41+
writable: true,
42+
configurable: true,
43+
});
44+
Object.defineProperty(window, 'location', {
45+
value: originalLocation,
46+
writable: true,
47+
configurable: true,
48+
});
49+
Object.defineProperty(window, 'history', {
50+
value: originalHistory,
3851
writable: true,
52+
configurable: true,
3953
});
4054
});
4155

0 commit comments

Comments
 (0)