From ceb721cb1ac5c3ddcebcad0609fb2feee2f2d099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Balayn?= Date: Mon, 12 Mar 2018 14:33:24 +0100 Subject: [PATCH] add tests to isSupported for multiple browsers and throw --- test/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 6b01cbb..ef9bcd1 100644 --- a/test/index.js +++ b/test/index.js @@ -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() })