Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-till committed Nov 29, 2023
1 parent 612700a commit b9ab1f2
Show file tree
Hide file tree
Showing 5 changed files with 1,271 additions and 1,601 deletions.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
collectCoverageFrom: ['**/*.{ts,tsx}'],
modulePathIgnorePatterns: ['lib'],
coveragePathIgnorePatterns: ['node_modules', 'src/index.ts'],
transformIgnorePatterns: [
'node_modules/(?!(@react-native|react-native)|react-native-modal|react-native-fabric|)',
],
transform: {
'^.+\\.js$': require.resolve('react-native/jest/preprocessor.js'),
},
Expand Down
30 changes: 21 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"modal",
"useModal"
],
"version": "0.1.9",
"version": "0.1.10",
"main": "lib/index",
"types": "lib",
"files": [
Expand Down Expand Up @@ -46,27 +46,39 @@
"react-native": ">=0.65.0"
},
"devDependencies": {
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.21.0",
"@tsconfig/react-native": "^3.0.0",
"@babel/core": "7.13.15",
"@babel/helper-string-parser": "7.18.10",
"@babel/plugin-proposal-class-properties": "7.13.0",
"@babel/plugin-proposal-export-default": "7.0.0-beta.32",
"@babel/plugin-proposal-export-default-from": "7.12.13",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/plugin-syntax-jsx": "7.12.13",
"@babel/plugin-transform-flow-strip-types": "7.16.7",
"@babel/plugin-transform-object-assign": "7.12.13",
"@babel/plugin-transform-react-jsx-self": "7.16.7",
"@babel/plugin-transform-react-jsx-source": "7.16.7",
"@babel/preset-env": "7.13.15",
"@babel/preset-react": "7.13.13",
"@babel/preset-typescript": "7.13.0",
"@babel/runtime": "7.13.10",
"@types/jest": "26.0.15",
"@types/react": "18.2.38",
"@types/react-native": "0.72.7",
"@types/react-test-renderer": "18.0.7",
"@typescript-eslint/eslint-plugin": "4.6.0",
"@typescript-eslint/parser": "4.6.0",
"babel-jest": "26.6.3",
"eslint": "7.12.1",
"eslint-config-prettier": "6.15.0",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.2.0",
"husky": "4.3.0",
"jest": "26.6.1",
"jest": "26.6.3",
"prettier": "2.1.2",
"pretty-quick": "3.1.0",
"react": "18.0.0",
"react-native": "0.71.0",
"react-test-renderer": "18.2.0",
"react": "17.0.2",
"react-native": "0.66.5",
"react-test-renderer": "17.0.2",
"typescript": "4.9.4"
},
"husky": {
Expand Down
2 changes: 1 addition & 1 deletion tests/useModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('useModal', () => {
const TestConsumer: React.FC = () => {
const value = useModal();
spy(value);
return null;
return <></>;
};

create(
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": "@tsconfig/react-native/tsconfig.json",
"compilerOptions": {
"jsx": "react",
"declaration": true,
Expand Down
Loading

0 comments on commit b9ab1f2

Please sign in to comment.