Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
5
test/detectDeviceType/detectDeviceType.js
Normal file
5
test/detectDeviceType/detectDeviceType.js
Normal file
@ -0,0 +1,5 @@
|
||||
const detectDeviceType = () =>
|
||||
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
||||
? 'Mobile'
|
||||
: 'Desktop';
|
||||
module.exports = detectDeviceType;
|
||||
Reference in New Issue
Block a user