Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add react-native-contacts type definitions for v5.x.x#4045

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
katieisnell wants to merge1 commit intoflow-typed:master
base:master
Choose a base branch
Loading
fromkatieisnell:add-react-native-contacts-types

Conversation

@katieisnell
Copy link

  • Links to documentation:
  • Link to GitHub or NPM:
  • Type of contribution: new definition

Other notes:
I struggled to write tests for the libraryreact-native-contacts, so please can someone help me to understand how to do this?

@Brianzchen
Copy link
Member

@katieisnell for testing, follow some of the examples in the project. Maybe this one for app-root-path that I did recently.
https://github.com/flow-typed/flow-typed/blob/master/definitions/npm/app-root-path_v3.x.x/flow_v0.142.x-/test_app-root-path_v3.x.x.js

Group your tests in describe/it blocks and then write tests that validate your library definitions so that if someone were to accidentally change it to something unexpected it would fail. Remember you are testing just the definitions not the library itself so test if you can use a function in a particular way you expect.

Also don't forget to add some cases you expect to fail and then use suppression codes to validate they fail as expected, this will be helpful if you want to check that function A definitely returns void or something.

Once you've written some tests you can run it with./quick_run_def_tests.sh if you are on linux/macos orquick_run_def_tests.cmd if you are on windows.

pascalduez reacted with thumbs up emoji

@gantoinegantoine added the changes requestedChanges have been requested by a reviewer labelMay 11, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

changes requestedChanges have been requested by a reviewer

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@katieisnell@Brianzchen@gantoine@KatieSnell-TomTom

[8]ページ先頭

©2009-2025 Movatter.jp