feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

View File

@@ -0,0 +1,527 @@
describe("Amazon", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("Amazon Kindle Fire User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HD User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HD 8.9inch User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HD 8.9inch 4G User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HD 7inch (3rd Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HDX 7inch (3rd Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HDX 7 (3rd Generation) 4G User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HDX 8.9inch (3rd Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Kindle Fire HDX 8.9inch (3rd Generation) 4G User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Fire HD 6 (4th Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Fire HD 7 (4th Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Fire HDX 8.9 (4th Generation) User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Fire HDX 8.9 (4th Generation) 4G User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Amazon Phone", function() {
expect(mobile.amazon.phone).not.toBe(true);
});
it("should be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Amazon Fire Phone User Agent", function() {
beforeEach(function() {
userAgent = "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";
mobile = new isMobile.Class(userAgent);
});
it("should be an Amazon Phone", function() {
expect(mobile.amazon.phone).toBe(true);
});
it("should not be an Amazon Tablet", function() {
expect(mobile.amazon.tablet).not.toBe(true);
});
it("should be an Amazon device", function() {
expect(mobile.amazon.device).toBe(true);
});
it("should be an Android Phone", function() {
expect(mobile.android.phone).toBe(true);
});
it("should not be an Android Tablet", function() {
expect(mobile.android.tablet).not.toBe(true);
});
it("should be matched as Any Phone", function() {
expect(mobile.phone).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
});

View File

@@ -0,0 +1,59 @@
describe("Android", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("Phone UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev> (KHTML, like Gecko) Chrome/<Chrome Rev> Mobile Safari/<WebKit Rev>";
mobile = new isMobile.Class(userAgent);
});
it("should be an Android Phone", function() {
expect(mobile.android.phone).toBe(true);
});
it("should not be an Android Tablet", function() {
expect(mobile.android.tablet).not.toBe(true);
});
it("should be matched as Any Phone", function() {
expect(mobile.phone).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
describe("Tablet UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Linux; <Android Version>; <Build Tag etc.>) AppleWebKit/<WebKit Rev>(KHTML, like Gecko) Chrome/<Chrome Rev> Safari/<WebKit Rev>";
mobile = new isMobile.Class(userAgent);
});
it("should not be an Android Phone", function() {
expect(mobile.android.phone).not.toBe(true);
});
it("should be an Android Tablet", function() {
expect(mobile.android.tablet).toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
});
});

View File

@@ -0,0 +1,193 @@
describe("Apple", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("iPhone UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3";
mobile = new isMobile.Class(userAgent);
});
it("should be an iPhone", function() {
expect(mobile.apple.phone).toBe(true);
});
it("should not be an iPad", function() {
expect(mobile.apple.tablet).not.toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be matched as Any Phone", function() {
expect(mobile.phone).toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("iPad UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10";
mobile = new isMobile.Class(userAgent);
});
it("should not be an iPhone", function() {
expect(mobile.apple.phone).not.toBe(true);
});
it("should be an iPad", function() {
expect(mobile.apple.tablet).toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("iPod UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3";
mobile = new isMobile.Class(userAgent);
});
it("should not be an iPhone", function() {
expect(mobile.apple.phone).not.toBe(true);
});
it("should not be an iPad", function() {
expect(mobile.apple.tablet).not.toBe(true);
});
it("should be an iPod", function() {
expect(mobile.apple.ipod).toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("Facebook iPhone App UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPhone; CPU OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12B410 [FBAN/FBIOS;FBAV/20.1.0.15.10;FBBV/5758778;FBDV/iPad5,4;FBMD/iPad;FBSN/iPhone OS;FBSV/8.1;FBSS/2; FBCR/;FBID/tablet;FBLC/fi_FI;FBOP/1]";
mobile = new isMobile.Class(userAgent);
});
it("should be an iPhone", function() {
expect(mobile.apple.phone).toBe(true);
});
it("should not be an iPad", function() {
expect(mobile.apple.tablet).not.toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("Facebook iPad App UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPad; CPU OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12B410 [FBAN/FBIOS;FBAV/20.1.0.15.10;FBBV/5758778;FBDV/iPad5,4;FBMD/iPad;FBSN/iPhone OS;FBSV/8.1;FBSS/2; FBCR/;FBID/tablet;FBLC/fi_FI;FBOP/1]";
mobile = new isMobile.Class(userAgent);
});
it("should not be an iPhone", function() {
expect(mobile.apple.phone).not.toBe(true);
});
it("should be an iPad", function() {
expect(mobile.apple.tablet).toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("Twitter iPhone App UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13D15 Twitter for iPhone";
mobile = new isMobile.Class(userAgent);
});
it("should be an iPhone", function() {
expect(mobile.apple.phone).toBe(true);
});
it("should not be an iPad", function() {
expect(mobile.apple.tablet).not.toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
describe("Twitter iPad App UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (iPad; CPU OS 9_2_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13D15 Twitter for iPhone";
mobile = new isMobile.Class(userAgent);
});
it("should not be an iPhone", function() {
expect(mobile.apple.phone).not.toBe(true);
});
it("should be an iPad", function() {
expect(mobile.apple.tablet).toBe(true);
});
it("should not be an iPod", function() {
expect(mobile.apple.ipod).not.toBe(true);
});
it("should be an Apple device", function() {
expect(mobile.apple.device).toBe(true);
});
});
});

View File

@@ -0,0 +1,36 @@
describe("Desktop", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("Chrome", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19";
mobile = new isMobile.Class(userAgent);
});
it("should not be a mobile device", function() {
expect(mobile.any).not.toBe(true);
});
});
describe("Safari", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10";
mobile = new isMobile.Class(userAgent);
});
it("should not be a mobile device", function() {
expect(mobile.any).not.toBe(true);
});
});
});

View File

@@ -0,0 +1,163 @@
describe("Other Mobile Devices", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("BlackBerry 10", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.2.0.1791 Mobile Safari/537.35+";
mobile = new isMobile.Class(userAgent);
});
it("should not be a Chrome device", function() {
expect(mobile.other.chrome).not.toBe(true);
});
it("should be a BlackBerry 10 device", function() {
expect(mobile.other.blackberry10).toBe(true);
});
it("should not be a BlackBerry device", function() {
expect(mobile.other.blackberry).not.toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("BlackBerry", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+";
mobile = new isMobile.Class(userAgent);
});
it("should not be a Chrome device", function() {
expect(mobile.other.chrome).not.toBe(true);
});
it("should be a BlackBerry device", function() {
expect(mobile.other.blackberry).toBe(true);
});
it("should not be a BlackBerry 10 device", function() {
expect(mobile.other.blackberry10).not.toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("Opera Mini", function() {
beforeEach(function() {
userAgent = "Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54";
mobile = new isMobile.Class(userAgent);
});
it("should not be a Chrome device", function() {
expect(mobile.other.chrome).not.toBe(true);
});
it("should be an Opera Mini device", function() {
expect(mobile.other.opera).toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("Firefox OS", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0";
mobile = new isMobile.Class(userAgent);
});
it("should not be a Chrome device", function() {
expect(mobile.other.chrome).not.toBe(true);
});
it("should be a Firefox OS device", function() {
expect(mobile.other.firefox).toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("Chrome", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Linux; Android 4.4.4; en-us; Nexus 4 Build/JOP40D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36";
mobile = new isMobile.Class(userAgent);
});
it("should be a Chrome device", function() {
expect(mobile.other.chrome).toBe(true);
});
it("should be an Android device", function() {
expect(mobile.android.device).toBe(true);
});
it("should not be a Firefox OS device", function() {
expect(mobile.other.firefox).toBe(false);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
});

View File

@@ -0,0 +1,31 @@
describe("Seven Inch", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("Nexus 7", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19";
mobile = new isMobile.Class(userAgent);
});
it("should be a Seven Inch device", function() {
expect(mobile.seven_inch).toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
});

View File

@@ -0,0 +1,105 @@
describe("Windows", function(){
var mobile;
var userAgent;
beforeEach(function() {
mobile = null;
userAgent = null;
});
describe("Windows Phone UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0)";
mobile = new isMobile.Class(userAgent);
});
it("should be a Windows Phone device", function() {
expect(mobile.windows.phone).toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be matched as Any Phone", function() {
expect(mobile.phone).toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("Windows Tablet UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)";
mobile = new isMobile.Class(userAgent);
});
it("should be a Windows Tablet device", function() {
expect(mobile.windows.tablet).toBe(true);
});
it("should not be a Windows Phone device", function() {
expect(mobile.other.windows).not.toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should be matched as Any Tablet", function() {
expect(mobile.tablet).toBe(true);
});
it("should be a mobile device", function() {
expect(mobile.any).toBe(true);
});
});
describe("Windows Touch Laptop UserAgent", function() {
beforeEach(function() {
userAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; MAGWJS; rv:11.0) like Gecko";
mobile = new isMobile.Class(userAgent);
});
it("should not be a Windows Tablet device", function() {
expect(mobile.windows.tablet).not.toBe(true);
});
it("should not be a Windows Phone device", function() {
expect(mobile.other.windows).not.toBe(true);
});
it("should not be an Android device", function() {
expect(mobile.android.device).not.toBe(true);
});
it("should not be an Apple device", function() {
expect(mobile.apple.device).not.toBe(true);
});
it("should not be matched as Any Tablet", function() {
expect(mobile.tablet).not.toBe(true);
});
it("should not be a mobile device", function() {
expect(mobile.any).not.toBe(true);
});
});
});