Skip to content

Commit

Permalink
add tests to isSupported for multiple browsers and throw
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyalab committed Mar 12, 2018
1 parent f0c5d88 commit ceb721c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ test("getLatestStableBrowsers tests", (t) => {
test("isSupported tests", (t) => {
t.ok(caniuse.isSupported("border-radius", "ie 9"), "border-radius is supported on ie 9")
t.notOk(caniuse.isSupported("border-radius", "ie 8"), "border-radius is not supported on ie 8")
t.throws(() => caniuse.isSupported("canaillou", "chrome 37"),"throws if silly thing are asked")
t.ok(caniuse.isSupported("border-radius", "chrome 45, ie 11"), "works when you pass multiple browsers")
t.throws(() => caniuse.isSupported("canaillou", "chrome 37"), "throws if silly thing are asked")
t.throws(() => caniuse.isSupported("border-radius", "not a real browser"), "throws if you do not pass a real browser")
t.end()
})

Expand Down

0 comments on commit ceb721c

Please sign in to comment.