Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^9.16.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @vitest-environment node
*
* SSR environment tests - runs in Node.js where window is truly undefined
*/
import { describe, expect, it } from 'vitest';

import { useKeyboardHeight } from './useKeyboardHeight.ts';

describe('useKeyboardHeight SSR environment', () => {
it('should be safe on server side rendering', () => {
expect(typeof window).toBe('undefined');

// Should not throw during module evaluation
expect(() => useKeyboardHeight).not.toThrow();
});

it('should not throw when imported in SSR', () => {
// In Node environment, window is undefined
expect(typeof window).toBe('undefined');

// Just verify the hook can be called (doesn't actually run without React context)
expect(typeof useKeyboardHeight).toBe('function');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @vitest-environment node
*
* SSR environment tests - runs in Node.js where window is truly undefined
*/
import { describe, expect, it } from 'vitest';

import { useAvoidKeyboard } from './useAvoidKeyboard.ts';

describe('useAvoidKeyboard SSR environment', () => {
it('should be safe on server side rendering', () => {
expect(typeof window).toBe('undefined');

// Should not throw during module evaluation
expect(() => useAvoidKeyboard).not.toThrow();
});

it('should not throw when imported in SSR', () => {
// In Node environment, window is undefined
expect(typeof window).toBe('undefined');

// Just verify the hook can be called (doesn't actually run without React context)
expect(typeof useAvoidKeyboard).toBe('function');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @vitest-environment node
*
* SSR environment tests - runs in Node.js where window is truly undefined
*/
import { describe, expect, it } from 'vitest';

import { useNetworkStatus } from './useNetworkStatus.ts';

describe('useNetworkStatus SSR environment', () => {
it('should be safe on server side rendering', () => {
expect(typeof window).toBe('undefined');

// Should not throw during module evaluation
expect(() => useNetworkStatus).not.toThrow();
});

it('should not throw when imported in SSR', () => {
// In Node environment, window is undefined
expect(typeof window).toBe('undefined');

// Just verify the hook can be called (doesn't actually run without React context)
expect(typeof useNetworkStatus).toBe('function');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @vitest-environment node
*
* SSR environment tests - runs in Node.js where window is truly undefined
*/
import { describe, expect, it } from 'vitest';

import { usePageVisibility } from './usePageVisibility.ts';

describe('usePageVisibility SSR environment', () => {
it('should be safe on server side rendering', () => {
expect(typeof window).toBe('undefined');

// Should not throw during module evaluation
expect(() => usePageVisibility).not.toThrow();
});

it('should not throw when imported in SSR', () => {
// In Node environment, window is undefined
expect(typeof window).toBe('undefined');

// Just verify the hook can be called (doesn't actually run without React context)
expect(typeof usePageVisibility).toBe('function');
});
});
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3685,6 +3685,7 @@ __metadata:
"@testing-library/react": "npm:^16.1.0"
"@types/react": "npm:^19.0.0"
"@types/react-dom": "npm:^19.0.0"
"@vitest/coverage-v8": "npm:^2.1.8"
eslint: "npm:^9.16.0"
react: "npm:^19.0.0"
react-dom: "npm:^19.0.0"
Expand Down
Loading