/
Tests.html
64 lines (51 loc) · 2.77 KB
/
Tests.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Cache-control" content="no-Cache" />
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-1.23.1.css">
<script src="http://sinonjs.org/releases/sinon-1.17.2.js"></script>
<title>Tests for Application Insights JavaScript API</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.js"></script>
<script src="../../../common/Tests/Selenium/ModuleLoader.js"></script>
<script src="../../../common/Tests/Selenium/SimpleSyncPromise.js"></script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script>
var modules = new ModuleLoader({
baseUrl: '../../',
paths: {
qunit: "../common/Tests/External/qunit-1.23.1",
"whatwg-fetch": "../common/Tests/External/whatwg-fetch.3.0.0",
tests: 'Tests/appinsights-sdk.tests'
}
});
// Load qunit here instead of with tests, otherwise will not work
modules.add("qunit");
loadFetchModule(modules, "whatwg-fetch");
// Load and define the app insights Shims module
modules.add("@microsoft/applicationinsights-shims", "./node_modules/@microsoft/applicationinsights-shims/browser/applicationinsights-shims");
// Load Core
modules.add("@microsoft/applicationinsights-core-js", "./node_modules/@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js");
// Load Common
modules.add("@microsoft/applicationinsights-common", "./node_modules/@microsoft/applicationinsights-common/browser/applicationinsights-common");
// Load Analytics
modules.add("@microsoft/applicationinsights-analytics-js", "./node_modules/@microsoft/applicationinsights-analytics-js/browser/applicationinsights-analytics-js");
// Load Channel
modules.add("@microsoft/applicationinsights-channel-js", "./node_modules/@microsoft/applicationinsights-channel-js/browser/applicationinsights-channel-js");
// Load Properties
modules.add("@microsoft/applicationinsights-properties-js", "./node_modules/@microsoft/applicationinsights-properties-js/browser/applicationinsights-properties-js");
// Load Dependencies
modules.add("@microsoft/applicationinsights-dependencies-js", "./node_modules/@microsoft/applicationinsights-dependencies-js/browser/applicationinsights-dependencies-js");
var testModule = modules.add("Tests/Selenium/appinsights-sdk.tests")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
};
modules.run();
</script>
</body>
</html>