tests for telemetry.js

Please fix to `typeof(document) !== 'undefined'`, but otherwise this is a good catch... I wonder how bbrittain was able to use this in node.js