Test isSupported
kind of stupid, but I don't want to maintain a list of browser UA or whatever.
This commit is contained in:
1 parent
11b3e27288
commit
f992aa1702
2 files changed
+16
No files matched your search
@@ -0,0 +1,8 @@
|
|||||||
|
module.exports = function() {
|
||||||
|
// Borrowed wholesale from https://github.com/defunkt/jquery-pjax
|
||||||
|
return window.history &&
|
||||||
|
window.history.pushState &&
|
||||||
|
window.history.replaceState &&
|
||||||
|
// pushState isn’t reliable on iOS until 5.
|
||||||
|
!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
var tape = require("tape")
|
||||||
|
|
||||||
|
var isSupported = require("../../../src/scripts/lib/is-supported.js")
|
||||||
|
|
||||||
|
tape("test isSupported method", function(t) {
|
||||||
|
t.true(isSupported(), "well, we run test on supported browser, so it should be ok here")
|
||||||
|
t.end()
|
||||||
|
})
|
||||||
Reference in new issue
Block a user