Skip to content

Commit 4375a48

Browse files
committed
Other: Added a test case to find out if all the fallbacks are just for IE8
1 parent 0d66b83 commit 4375a48

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/_support.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var tape = require("tape");
2+
3+
var protobuf = require("..");
4+
5+
function name(fn) {
6+
if (!fn)
7+
return "" + fn;
8+
return fn.name;
9+
}
10+
11+
var ans = {};
12+
try {
13+
Object.defineProperty(ans, "wer", {
14+
get: function() {
15+
return 42;
16+
}
17+
});
18+
} catch (e) {}
19+
20+
tape.test("environment supports", function(test) {
21+
test.ok(typeof Uint8Array !== "undefined", "Uint8Array");
22+
test.ok(ans.wer === 42, "getters/setters");
23+
test.end();
24+
});

0 commit comments

Comments
 (0)