Skip to content

Ability to Set Device Model for Unit Tests #28

Description

@joncursi

This library is great! I've started using ternary expressions such as Device.isIpad() ? a : b throughout my code. But now I'm at a point where I'd like to test it (I am using Enzyme to unit test my entire app).

Therefore, it would be great if this library supplied a setDevice method that can be invoked before the tests run. Otherwise, as it currently stands, Device.model is evaluated as undefined in all tests, so these ternary expressions are untestable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions