1 | import isMobile, { isMobileResult } from '../';
|
2 |
|
3 | describe('Amazon', () => {
|
4 | let mobile: isMobileResult;
|
5 | let userAgent: string;
|
6 |
|
7 | describe('Amazon Kindle Fire User Agent', () => {
|
8 | beforeEach(() => {
|
9 | userAgent =
|
10 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFOT Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
11 | mobile = isMobile(userAgent);
|
12 | });
|
13 |
|
14 | test('should not be an Amazon Phone', () => {
|
15 | expect(mobile.amazon.phone).not.toBe(true);
|
16 | });
|
17 |
|
18 | test('should be an Amazon Tablet', () => {
|
19 | expect(mobile.amazon.tablet).toBe(true);
|
20 | });
|
21 |
|
22 | test('should be an Amazon device', () => {
|
23 | expect(mobile.amazon.device).toBe(true);
|
24 | });
|
25 |
|
26 | test('should not be an Android Phone', () => {
|
27 | expect(mobile.android.phone).not.toBe(true);
|
28 | });
|
29 |
|
30 | test('should be an Android Tablet', () => {
|
31 | expect(mobile.android.tablet).toBe(true);
|
32 | });
|
33 |
|
34 | test('should be matched as Any Tablet', () => {
|
35 | expect(mobile.tablet).toBe(true);
|
36 | });
|
37 |
|
38 | test('should be an Android device', () => {
|
39 | expect(mobile.android.device).toBe(true);
|
40 | });
|
41 | });
|
42 |
|
43 | describe('Amazon Kindle Fire HD User Agent', () => {
|
44 | beforeEach(() => {
|
45 | userAgent =
|
46 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFTT Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
47 | mobile = isMobile(userAgent);
|
48 | });
|
49 |
|
50 | test('should not be an Amazon Phone', () => {
|
51 | expect(mobile.amazon.phone).not.toBe(true);
|
52 | });
|
53 |
|
54 | test('should be an Amazon Tablet', () => {
|
55 | expect(mobile.amazon.tablet).toBe(true);
|
56 | });
|
57 |
|
58 | test('should be an Amazon device', () => {
|
59 | expect(mobile.amazon.device).toBe(true);
|
60 | });
|
61 |
|
62 | test('should not be an Android Phone', () => {
|
63 | expect(mobile.android.phone).not.toBe(true);
|
64 | });
|
65 |
|
66 | test('should be an Android Tablet', () => {
|
67 | expect(mobile.android.tablet).toBe(true);
|
68 | });
|
69 |
|
70 | test('should be matched as Any Tablet', () => {
|
71 | expect(mobile.tablet).toBe(true);
|
72 | });
|
73 |
|
74 | test('should be an Android device', () => {
|
75 | expect(mobile.android.device).toBe(true);
|
76 | });
|
77 | });
|
78 |
|
79 | describe('Amazon Kindle Fire HD 8.9inch User Agent', () => {
|
80 | beforeEach(() => {
|
81 | userAgent =
|
82 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFJWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
83 | mobile = isMobile(userAgent);
|
84 | });
|
85 |
|
86 | test('should not be an Amazon Phone', () => {
|
87 | expect(mobile.amazon.phone).not.toBe(true);
|
88 | });
|
89 |
|
90 | test('should be an Amazon Tablet', () => {
|
91 | expect(mobile.amazon.tablet).toBe(true);
|
92 | });
|
93 |
|
94 | test('should be an Amazon device', () => {
|
95 | expect(mobile.amazon.device).toBe(true);
|
96 | });
|
97 |
|
98 | test('should not be an Android Phone', () => {
|
99 | expect(mobile.android.phone).not.toBe(true);
|
100 | });
|
101 |
|
102 | test('should be an Android Tablet', () => {
|
103 | expect(mobile.android.tablet).toBe(true);
|
104 | });
|
105 |
|
106 | test('should be matched as Any Tablet', () => {
|
107 | expect(mobile.tablet).toBe(true);
|
108 | });
|
109 |
|
110 | test('should be an Android device', () => {
|
111 | expect(mobile.android.device).toBe(true);
|
112 | });
|
113 | });
|
114 |
|
115 | describe('Amazon Kindle Fire HD 8.9inch 4G User Agent', () => {
|
116 | beforeEach(() => {
|
117 | userAgent =
|
118 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFJWA Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
119 | mobile = isMobile(userAgent);
|
120 | });
|
121 |
|
122 | test('should not be an Amazon Phone', () => {
|
123 | expect(mobile.amazon.phone).not.toBe(true);
|
124 | });
|
125 |
|
126 | test('should be an Amazon Tablet', () => {
|
127 | expect(mobile.amazon.tablet).toBe(true);
|
128 | });
|
129 |
|
130 | test('should be an Amazon device', () => {
|
131 | expect(mobile.amazon.device).toBe(true);
|
132 | });
|
133 |
|
134 | test('should not be an Android Phone', () => {
|
135 | expect(mobile.android.phone).not.toBe(true);
|
136 | });
|
137 |
|
138 | test('should be an Android Tablet', () => {
|
139 | expect(mobile.android.tablet).toBe(true);
|
140 | });
|
141 |
|
142 | test('should be matched as Any Tablet', () => {
|
143 | expect(mobile.tablet).toBe(true);
|
144 | });
|
145 |
|
146 | test('should be an Android device', () => {
|
147 | expect(mobile.android.device).toBe(true);
|
148 | });
|
149 | });
|
150 |
|
151 | describe('Amazon Kindle Fire HD 7inch (3rd Generation) User Agent', () => {
|
152 | beforeEach(() => {
|
153 | userAgent =
|
154 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFSOWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
155 | mobile = isMobile(userAgent);
|
156 | });
|
157 |
|
158 | test('should not be an Amazon Phone', () => {
|
159 | expect(mobile.amazon.phone).not.toBe(true);
|
160 | });
|
161 |
|
162 | test('should be an Amazon Tablet', () => {
|
163 | expect(mobile.amazon.tablet).toBe(true);
|
164 | });
|
165 |
|
166 | test('should be an Amazon device', () => {
|
167 | expect(mobile.amazon.device).toBe(true);
|
168 | });
|
169 |
|
170 | test('should not be an Android Phone', () => {
|
171 | expect(mobile.android.phone).not.toBe(true);
|
172 | });
|
173 |
|
174 | test('should be an Android Tablet', () => {
|
175 | expect(mobile.android.tablet).toBe(true);
|
176 | });
|
177 |
|
178 | test('should be matched as Any Tablet', () => {
|
179 | expect(mobile.tablet).toBe(true);
|
180 | });
|
181 |
|
182 | test('should be an Android device', () => {
|
183 | expect(mobile.android.device).toBe(true);
|
184 | });
|
185 | });
|
186 |
|
187 | describe('Amazon Kindle Fire HDX 7inch (3rd Generation) User Agent', () => {
|
188 | beforeEach(() => {
|
189 | userAgent =
|
190 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFTHWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
191 | mobile = isMobile(userAgent);
|
192 | });
|
193 |
|
194 | test('should not be an Amazon Phone', () => {
|
195 | expect(mobile.amazon.phone).not.toBe(true);
|
196 | });
|
197 |
|
198 | test('should be an Amazon Tablet', () => {
|
199 | expect(mobile.amazon.tablet).toBe(true);
|
200 | });
|
201 |
|
202 | test('should be an Amazon device', () => {
|
203 | expect(mobile.amazon.device).toBe(true);
|
204 | });
|
205 |
|
206 | test('should not be an Android Phone', () => {
|
207 | expect(mobile.android.phone).not.toBe(true);
|
208 | });
|
209 |
|
210 | test('should be an Android Tablet', () => {
|
211 | expect(mobile.android.tablet).toBe(true);
|
212 | });
|
213 |
|
214 | test('should be matched as Any Tablet', () => {
|
215 | expect(mobile.tablet).toBe(true);
|
216 | });
|
217 |
|
218 | test('should be an Android device', () => {
|
219 | expect(mobile.android.device).toBe(true);
|
220 | });
|
221 | });
|
222 |
|
223 | describe('Amazon Kindle Fire HDX 7 (3rd Generation) 4G User Agent', () => {
|
224 | beforeEach(() => {
|
225 | userAgent =
|
226 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFTHWA Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
227 | mobile = isMobile(userAgent);
|
228 | });
|
229 |
|
230 | test('should not be an Amazon Phone', () => {
|
231 | expect(mobile.amazon.phone).not.toBe(true);
|
232 | });
|
233 |
|
234 | test('should be an Amazon Tablet', () => {
|
235 | expect(mobile.amazon.tablet).toBe(true);
|
236 | });
|
237 |
|
238 | test('should be an Amazon device', () => {
|
239 | expect(mobile.amazon.device).toBe(true);
|
240 | });
|
241 |
|
242 | test('should not be an Android Phone', () => {
|
243 | expect(mobile.android.phone).not.toBe(true);
|
244 | });
|
245 |
|
246 | test('should be an Android Tablet', () => {
|
247 | expect(mobile.android.tablet).toBe(true);
|
248 | });
|
249 |
|
250 | test('should be matched as Any Tablet', () => {
|
251 | expect(mobile.tablet).toBe(true);
|
252 | });
|
253 |
|
254 | test('should be an Android device', () => {
|
255 | expect(mobile.android.device).toBe(true);
|
256 | });
|
257 | });
|
258 |
|
259 | describe('Amazon Kindle Fire HDX 8.9inch (3rd Generation) User Agent', () => {
|
260 | beforeEach(() => {
|
261 | userAgent =
|
262 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFAPWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
263 | mobile = isMobile(userAgent);
|
264 | });
|
265 |
|
266 | test('should not be an Amazon Phone', () => {
|
267 | expect(mobile.amazon.phone).not.toBe(true);
|
268 | });
|
269 |
|
270 | test('should be an Amazon Tablet', () => {
|
271 | expect(mobile.amazon.tablet).toBe(true);
|
272 | });
|
273 |
|
274 | test('should be an Amazon device', () => {
|
275 | expect(mobile.amazon.device).toBe(true);
|
276 | });
|
277 |
|
278 | test('should not be an Android Phone', () => {
|
279 | expect(mobile.android.phone).not.toBe(true);
|
280 | });
|
281 |
|
282 | test('should be an Android Tablet', () => {
|
283 | expect(mobile.android.tablet).toBe(true);
|
284 | });
|
285 |
|
286 | test('should be matched as Any Tablet', () => {
|
287 | expect(mobile.tablet).toBe(true);
|
288 | });
|
289 |
|
290 | test('should be an Android device', () => {
|
291 | expect(mobile.android.device).toBe(true);
|
292 | });
|
293 | });
|
294 |
|
295 | describe('Amazon Kindle Fire HDX 8.9inch (3rd Generation) 4G User Agent', () => {
|
296 | beforeEach(() => {
|
297 | userAgent =
|
298 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFAPWA Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
299 | mobile = isMobile(userAgent);
|
300 | });
|
301 |
|
302 | test('should not be an Amazon Phone', () => {
|
303 | expect(mobile.amazon.phone).not.toBe(true);
|
304 | });
|
305 |
|
306 | test('should be an Amazon Tablet', () => {
|
307 | expect(mobile.amazon.tablet).toBe(true);
|
308 | });
|
309 |
|
310 | test('should be an Amazon device', () => {
|
311 | expect(mobile.amazon.device).toBe(true);
|
312 | });
|
313 |
|
314 | test('should not be an Android Phone', () => {
|
315 | expect(mobile.android.phone).not.toBe(true);
|
316 | });
|
317 |
|
318 | test('should be an Android Tablet', () => {
|
319 | expect(mobile.android.tablet).toBe(true);
|
320 | });
|
321 |
|
322 | test('should be matched as Any Tablet', () => {
|
323 | expect(mobile.tablet).toBe(true);
|
324 | });
|
325 |
|
326 | test('should be an Android device', () => {
|
327 | expect(mobile.android.device).toBe(true);
|
328 | });
|
329 | });
|
330 |
|
331 | describe('Amazon Fire HD 6 (4th Generation) User Agent', () => {
|
332 | beforeEach(() => {
|
333 | userAgent =
|
334 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFARWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
335 | mobile = isMobile(userAgent);
|
336 | });
|
337 |
|
338 | test('should not be an Amazon Phone', () => {
|
339 | expect(mobile.amazon.phone).not.toBe(true);
|
340 | });
|
341 |
|
342 | test('should be an Amazon Tablet', () => {
|
343 | expect(mobile.amazon.tablet).toBe(true);
|
344 | });
|
345 |
|
346 | test('should be an Amazon device', () => {
|
347 | expect(mobile.amazon.device).toBe(true);
|
348 | });
|
349 |
|
350 | test('should not be an Android Phone', () => {
|
351 | expect(mobile.android.phone).not.toBe(true);
|
352 | });
|
353 |
|
354 | test('should be an Android Tablet', () => {
|
355 | expect(mobile.android.tablet).toBe(true);
|
356 | });
|
357 |
|
358 | test('should be matched as Any Tablet', () => {
|
359 | expect(mobile.tablet).toBe(true);
|
360 | });
|
361 |
|
362 | test('should be an Android device', () => {
|
363 | expect(mobile.android.device).toBe(true);
|
364 | });
|
365 | });
|
366 |
|
367 | describe('Amazon Fire HD 7 (4th Generation) User Agent', () => {
|
368 | beforeEach(() => {
|
369 | userAgent =
|
370 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFASWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
371 | mobile = isMobile(userAgent);
|
372 | });
|
373 |
|
374 | test('should not be an Amazon Phone', () => {
|
375 | expect(mobile.amazon.phone).not.toBe(true);
|
376 | });
|
377 |
|
378 | test('should be an Amazon Tablet', () => {
|
379 | expect(mobile.amazon.tablet).toBe(true);
|
380 | });
|
381 |
|
382 | test('should be an Amazon device', () => {
|
383 | expect(mobile.amazon.device).toBe(true);
|
384 | });
|
385 |
|
386 | test('should not be an Android Phone', () => {
|
387 | expect(mobile.android.phone).not.toBe(true);
|
388 | });
|
389 |
|
390 | test('should be an Android Tablet', () => {
|
391 | expect(mobile.android.tablet).toBe(true);
|
392 | });
|
393 |
|
394 | test('should be matched as Any Tablet', () => {
|
395 | expect(mobile.tablet).toBe(true);
|
396 | });
|
397 |
|
398 | test('should be an Android device', () => {
|
399 | expect(mobile.android.device).toBe(true);
|
400 | });
|
401 | });
|
402 |
|
403 | describe('Amazon Fire HDX 8.9 (4th Generation) User Agent', () => {
|
404 | beforeEach(() => {
|
405 | userAgent =
|
406 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFSAWI Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
407 | mobile = isMobile(userAgent);
|
408 | });
|
409 |
|
410 | test('should not be an Amazon Phone', () => {
|
411 | expect(mobile.amazon.phone).not.toBe(true);
|
412 | });
|
413 |
|
414 | test('should be an Amazon Tablet', () => {
|
415 | expect(mobile.amazon.tablet).toBe(true);
|
416 | });
|
417 |
|
418 | test('should be an Amazon device', () => {
|
419 | expect(mobile.amazon.device).toBe(true);
|
420 | });
|
421 |
|
422 | test('should not be an Android Phone', () => {
|
423 | expect(mobile.android.phone).not.toBe(true);
|
424 | });
|
425 |
|
426 | test('should be an Android Tablet', () => {
|
427 | expect(mobile.android.tablet).toBe(true);
|
428 | });
|
429 |
|
430 | test('should be matched as Any Tablet', () => {
|
431 | expect(mobile.tablet).toBe(true);
|
432 | });
|
433 |
|
434 | test('should be an Android device', () => {
|
435 | expect(mobile.android.device).toBe(true);
|
436 | });
|
437 | });
|
438 |
|
439 | describe('Amazon Fire HDX 8.9 (4th Generation) 4G User Agent', () => {
|
440 | beforeEach(() => {
|
441 | userAgent =
|
442 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; KFSAWA Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
443 | mobile = isMobile(userAgent);
|
444 | });
|
445 |
|
446 | test('should not be an Amazon Phone', () => {
|
447 | expect(mobile.amazon.phone).not.toBe(true);
|
448 | });
|
449 |
|
450 | test('should be an Amazon Tablet', () => {
|
451 | expect(mobile.amazon.tablet).toBe(true);
|
452 | });
|
453 |
|
454 | test('should be an Amazon device', () => {
|
455 | expect(mobile.amazon.device).toBe(true);
|
456 | });
|
457 |
|
458 | test('should not be an Android Phone', () => {
|
459 | expect(mobile.android.phone).not.toBe(true);
|
460 | });
|
461 |
|
462 | test('should be an Android Tablet', () => {
|
463 | expect(mobile.android.tablet).toBe(true);
|
464 | });
|
465 |
|
466 | test('should be matched as Any Tablet', () => {
|
467 | expect(mobile.tablet).toBe(true);
|
468 | });
|
469 |
|
470 | test('should be an Android device', () => {
|
471 | expect(mobile.android.device).toBe(true);
|
472 | });
|
473 | });
|
474 |
|
475 | describe('Amazon Fire Phone User Agent', () => {
|
476 | beforeEach(() => {
|
477 | userAgent =
|
478 | 'Mozilla/5.0 (Linux; U; Android android-version; locale; SD4930UR Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Safari/webkit-version';
|
479 | mobile = isMobile(userAgent);
|
480 | });
|
481 |
|
482 | test('should be an Amazon Phone', () => {
|
483 | expect(mobile.amazon.phone).toBe(true);
|
484 | });
|
485 |
|
486 | test('should not be an Amazon Tablet', () => {
|
487 | expect(mobile.amazon.tablet).not.toBe(true);
|
488 | });
|
489 |
|
490 | test('should be an Amazon device', () => {
|
491 | expect(mobile.amazon.device).toBe(true);
|
492 | });
|
493 |
|
494 | test('should be an Android Phone', () => {
|
495 | expect(mobile.android.phone).toBe(true);
|
496 | });
|
497 |
|
498 | test('should not be an Android Tablet', () => {
|
499 | expect(mobile.android.tablet).not.toBe(true);
|
500 | });
|
501 |
|
502 | test('should be matched as Any Phone', () => {
|
503 | expect(mobile.phone).toBe(true);
|
504 | });
|
505 |
|
506 | test('should be an Android device', () => {
|
507 | expect(mobile.android.device).toBe(true);
|
508 | });
|
509 | });
|
510 |
|
511 | describe('Amazon Fire Generic Phone User Agent', () => {
|
512 | beforeEach(() => {
|
513 | userAgent =
|
514 | 'Mozilla/5.0 (Linux; Android android-version; product-model Build/product-build) AppleWebKit/webkit-version (KHTML, like Gecko) Silk/browser-version like Chrome/chrome-version Mobile Safari/webkit-version';
|
515 | mobile = isMobile(userAgent);
|
516 | });
|
517 |
|
518 | test('should be an Amazon Phone', () => {
|
519 | expect(mobile.amazon.phone).toBe(true);
|
520 | });
|
521 |
|
522 | test('should not be an Amazon Tablet', () => {
|
523 | expect(mobile.amazon.tablet).not.toBe(true);
|
524 | });
|
525 |
|
526 | test('should be an Amazon device', () => {
|
527 | expect(mobile.amazon.device).toBe(true);
|
528 | });
|
529 |
|
530 | test('should be an Android Phone', () => {
|
531 | expect(mobile.android.phone).toBe(true);
|
532 | });
|
533 |
|
534 | test('should not be an Android Tablet', () => {
|
535 | expect(mobile.android.tablet).not.toBe(true);
|
536 | });
|
537 |
|
538 | test('should be matched as Any Phone', () => {
|
539 | expect(mobile.phone).toBe(true);
|
540 | });
|
541 |
|
542 | test('should be an Android device', () => {
|
543 | expect(mobile.android.device).toBe(true);
|
544 | });
|
545 | });
|
546 | });
|