Skip to content

Conversation

@mCodex
Copy link
Owner

@mCodex mCodex commented Oct 27, 2025

  • Add jest.config.js and tsconfig.test.json for test environment
  • Add comprehensive unit tests and mocks under src/tests
  • Add GitHub Actions workflow .github/workflows/test.yml to run tests
  • Add test scripts and devDependencies (jest, ts-jest, jest-environment-jsdom, @testing-library, ts-node, react-dom) and update yarn.lock
  • Move coverage badge & add React Native minimum to README; minor .gitignore newline fix

- Add jest.config.js and tsconfig.test.json for test environment
- Add comprehensive unit tests and mocks under src/__tests__
- Add GitHub Actions workflow .github/workflows/test.yml to run tests
- Add test scripts and devDependencies (jest, ts-jest, jest-environment-jsdom, @testing-library, ts-node, react-dom) and update yarn.lock
- Move coverage badge & add React Native minimum to README; minor .gitignore newline fix
Copilot AI review requested due to automatic review settings October 27, 2025 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a comprehensive testing infrastructure for the react-native-sensitive-info library, including Jest configuration, unit tests for core functionality and React hooks, mocking utilities, and a GitHub Actions CI workflow to run tests automatically.

Key Changes

  • Added Jest testing infrastructure with TypeScript support (jest.config.js, tsconfig.test.json)
  • Created comprehensive unit tests covering storage operations, hooks, internal utilities, and error handling
  • Implemented GitHub Actions workflow to run tests on push/PR with coverage reporting

Reviewed Changes

Copilot reviewed 22 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.test.json TypeScript configuration for test environment with CommonJS module support
src/tests/storage.test.ts Unit tests for core storage API functions with mocked native layer
src/tests/internal.options.test.ts Tests for options normalization and default value handling
src/tests/internal.native.test.ts Tests verifying native instance memoization behavior
src/tests/internal.errors.test.ts Tests for error detection and message extraction utilities
src/tests/index.test.ts Tests ensuring package entrypoint exports are correct
src/tests/hooks.useStableOptions.test.tsx Tests for options memoization hook behavior
src/tests/hooks.useSecurityAvailability.test.tsx Tests for security capabilities detection hook
src/tests/hooks.useSecureStorage.test.tsx Comprehensive tests for secure storage hook operations
src/tests/hooks.useSecureOperation.test.tsx Tests for async operation wrapper hook
src/tests/hooks.useSecretItem.test.tsx Tests for individual secret item management hook
src/tests/hooks.useSecret.test.tsx Tests for secret CRUD operations hook
src/tests/hooks.useHasSecret.test.tsx Tests for secret existence checking hook
src/tests/hooks.useAsyncLifecycle.test.tsx Tests for async lifecycle management utilities
src/tests/hooks.types.test.ts Tests for hook error types and state initializers
src/tests/hooks.error-utils.test.ts Tests for hook error creation utility
src/tests/core.storage.test.ts Detailed tests for storage layer with native delegation
src/tests/mocks/react-native.ts Mock implementation of React Native core modules
src/tests/mocks/react-native-nitro-modules.ts Mock implementation of Nitro Modules hybrid objects
package.json Added test scripts and testing dependencies (Jest, Testing Library, ts-jest)
README.md Added coverage badge and React Native minimum version requirement
.github/workflows/test.yml CI workflow configuration for running tests on push/PR

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mCodex mCodex merged commit 4e29616 into master Oct 27, 2025
3 checks passed
@mCodex mCodex deleted the feat/testing branch October 27, 2025 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants