var test = require('./tape-wrapper'); test('timing test', function(t) { t.plan(2); t.equal(typeof Date.now, 'function'); var start = Date.now(); setTimeout(function () { t.equal(Date.now() - start, 100); }, 100); }); test('webgl support', function(t) { t.plan(1); var gl, canvas; try { canvas = document.createElement('canvas'); gl = canvas.getContext('webgl'); } catch(err) { gl = null; } var hasSupport = !!gl; t.equal(hasSupport, true); });