mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Restore old ga code and tests. Fix overload definition.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user