Skip to content

Incubator.Dialog - allow headless testing mocking #2443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

M-i-k-e-l
Copy link
Collaborator

Description

All changed in this PR are required for this to work except this one:

if (!modalVisibility) {
  return null;
}

Added typings/global.d.ts to solve a TS error (it is not exported); we can add an ignore if you prefer.

Changelog

Incubator.Dialog - support headless tests

jest-setup.js Outdated
@@ -1,4 +1,5 @@
import {NativeModules, AccessibilityInfo} from 'react-native';
global.__UI_LIB_TESTING__ = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have less underscores 😬

I think global.UILIB_TESTING or global._UILIB_TESTING is enough

@M-i-k-e-l M-i-k-e-l enabled auto-merge (squash) February 1, 2023 13:55
@M-i-k-e-l M-i-k-e-l merged commit a1985b7 into master Feb 1, 2023
@M-i-k-e-l M-i-k-e-l deleted the tests/incubator-dialog-support-headless-tests-v3 branch February 1, 2023 14:24
M-i-k-e-l added a commit that referenced this pull request Feb 5, 2023
* Incubator.Dialog - allow headless testing mocking

* Rename
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