From 4375a485789e14f7bf24bece819001154a03dca2 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Mon, 26 Dec 2016 01:38:51 +0100 Subject: [PATCH] Other: Added a test case to find out if all the fallbacks are just for IE8 --- tests/_support.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/_support.js diff --git a/tests/_support.js b/tests/_support.js new file mode 100644 index 000000000..aff343a65 --- /dev/null +++ b/tests/_support.js @@ -0,0 +1,24 @@ +var tape = require("tape"); + +var protobuf = require(".."); + +function name(fn) { + if (!fn) + return "" + fn; + return fn.name; +} + +var ans = {}; +try { + Object.defineProperty(ans, "wer", { + get: function() { + return 42; + } + }); +} catch (e) {} + +tape.test("environment supports", function(test) { + test.ok(typeof Uint8Array !== "undefined", "Uint8Array"); + test.ok(ans.wer === 42, "getters/setters"); + test.end(); +}); \ No newline at end of file