Restore old ga code and tests. Fix overload definition.

This commit is contained in:
Pat Kujawa
2014-10-13 14:40:26 -06:00
parent b2eabd1873
commit 7cf312b536
2 changed files with 23 additions and 5 deletions
+15 -3
View File
@@ -1,6 +1,21 @@
/// <reference path="ga.d.ts" />
/// <reference path="../jasmine/jasmine.d.ts" />
describe("tester Google Analytics Tracker _gat object", () => {
it("can set ga script element", () => {
gaClassic = <HTMLScriptElement>document.createElement("script");
});
it("can set aync to true", () => {
gaClassic.async = true;
});
it("can set src to string url", () => {
gaClassic.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
});
it("can set type", () => {
gaClassic.type = 'text/javascript';
});
});
describe('UniversalAnalytics', () => {
it('should exercise all ga APIs', () => {
ga('create', 'UA-65432-1', 'auto');
@@ -76,6 +91,3 @@ describe("tester Google Analytics Code Tracker object", () => {
tracker._trackPageLoadTime();
});
});