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
1 change: 1 addition & 0 deletions jest/mock.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '../lib/typescript/src/jest/mock';
1 change: 1 addition & 0 deletions jest/mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../lib/commonjs/jest/mock');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: After #740, we could introduce an "exports" entry to replace these shims (non-breaking).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do u know what is minimum version of rn / metro that supports exports?

@huntie huntie Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 changes: 2 additions & 2 deletions jest/mock.tsx → src/jest/mock.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { jest } from '@jest/globals';
import React, { useContext } from 'react';
import type { Metrics } from '../src/SafeArea.types';
import type { Metrics } from '../SafeArea.types';
import type {
SafeAreaProviderProps,
SafeAreaInsetsContext,
SafeAreaFrameContext,
} from '../src/SafeAreaContext';
} from '../SafeAreaContext';

const MOCK_INITIAL_METRICS: Metrics = {
frame: {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"rootDir": ".",
"allowJs": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
Expand All @@ -23,8 +24,7 @@
"include": [
"src",
".eslintrc.js",
"babel.config.js",
"jest"
"babel.config.js"
],
"exclude": [
"node_modules",
Expand Down
Loading