Skip to content

Commit

Permalink
fix(mobile): fix mobile is phone and tablet
Browse files Browse the repository at this point in the history
  • Loading branch information
yutin1987 committed May 21, 2017
1 parent bd61581 commit ccc7afb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/__test__/inapp.test.js
Expand Up @@ -234,7 +234,7 @@ describe('InApp', () => {

describe('isMobile', () => {
it('is mobile', () => {
_.forEach(MOBILE, device => _.forEach(device, useragents =>
_.forEach(Object.assign({}, MOBILE, TABLET), device => _.forEach(device, useragents =>
_.forEach(useragents, (useragent) => {
const inapp = new InApp(useragent);
expect(inapp.isMobile()).toBe(true);
Expand All @@ -243,7 +243,7 @@ describe('InApp', () => {
});

it('is not mobile', () => {
_.forEach(Object.assign({}, DESKTOP, TABLET), device => _.forEach(device, useragents =>
_.forEach(DESKTOP, device => _.forEach(device, useragents =>
_.forEach(useragents, (useragent) => {
const inapp = new InApp(useragent);
expect(inapp.isMobile()).toBe(false);
Expand Down
7 changes: 5 additions & 2 deletions src/inapp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ccc7afb

Please sign in to comment.