Skip to content
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

Tests contain false negatives #82

Open
helenaut opened this issue Apr 28, 2018 · 0 comments
Open

Tests contain false negatives #82

helenaut opened this issue Apr 28, 2018 · 0 comments

Comments

@helenaut
Copy link

helenaut commented Apr 28, 2018

Hello,

I noticed that MobileDetectSpec.js may allow for false negatives in method testUserAgent. For example, a test user agent like:

{
    "vendor": "Generic",
    "user_agent": "Java\/1.6.0_22",
    "mobile": false,
    "tablet": false,
    "version": {
        "Java": "1.6.0_22"
    }
}

(as seen in ualist.json)
will return true for mobile because it matches the detectmobilebrowsers.com (in mobile-detect.js). This is because testUserAgent only tests that mobile-detect.js returns mobile if it should be mobile. It does not test that mobile-detect.js does not return mobile if it should not be mobile.

I'm not sure if this intentional or not.

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

No branches or pull requests

1 participant