Skip to content

Conversation

@alanjcharles14
Copy link
Contributor

@alanjcharles14 alanjcharles14 commented Oct 30, 2025

  • Fixes broken unit test suite
  • Updates unit tests to remove deprecated methods
  • Updates unit tests to include return value validation
  • Updates unit tests to include parameter validation
  • Updates unit tests to account for edge-cases
  • Adds unit tests to CI
  • Adds dependency caching to CI to improve run times
  • Adds old architecture jobs for iOS and Android to CI

Copilot AI review requested due to automatic review settings October 30, 2025 16:51
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 modernizes the Jest test infrastructure to support React Native TurboModules while maintaining backward compatibility with legacy Native Modules. The changes update mocking strategies, refactor test assertions, and upgrade Babel dependencies for better TypeScript support.

Key changes:

  • Consolidated React Native module mocking to support both TurboModules and legacy Native Modules
  • Refactored event listener tests from generic on/off pattern to specific event handler tests
  • Removed sendEvent test coverage as this method doesn't exist in the native implementation
  • Added TypeScript preset to Babel configuration and updated related dependencies

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/jest.setup.js Unified mocking for React Native to include TurboModuleRegistry alongside NativeModules and NativeEventEmitter
test/index.test.js Updated test initialization to use TurboModuleRegistry, simplified trackOnce test structure, and replaced generic event tests with specific handler tests
package.json Added @babel/preset-typescript dependency and Jest configuration for module transformation patterns
package-lock.json Updated Babel package versions and dependencies to support TypeScript preset
babel.config.js Replaced legacy Babel presets with @react-native/babel-preset and added TypeScript support
.circleci/config.yml Added test execution step to CI pipeline

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

@alanjcharles14 alanjcharles14 changed the title [WIP] fix test suite FENCE-2444: Improve test infrastructure Oct 30, 2025
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