-
Notifications
You must be signed in to change notification settings - Fork 6
/
UnitTests.html
66 lines (51 loc) · 2.64 KB
/
UnitTests.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
65
66
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Cache-control" content="no-Cache" />
<title>Tests for Application Insights JavaScript API</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-1.23.1.css">
<script src="http://sinonjs.org/releases/sinon-2.3.8.js"></script>
<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>
<script>
var modules = new ModuleLoader({
baseUrl: '../',
paths: {
qunit: "../../common/Tests/External/qunit-1.23.1",
"react-native": "./Tests/External/DummyReactNative"
}
});
// Load qunit here instead of with tests, otherwise will not work
modules.add("qunit");
// Load and define the app insights test framework module
modules.add("@microsoft/ai-test-framework", "./node_modules/@microsoft/ai-test-framework/dist/ai-test-framework");
// Load and define the app insights Shims module
modules.add("@microsoft/applicationinsights-shims", "./node_modules/@microsoft/applicationinsights-shims/browser/applicationinsights-shims");
// Load ts-utils (ts-utils changed from umd to main)
modules.add("@nevware21/ts-utils", "./node_modules/@nevware21/ts-utils/dist/es5/main/ts-utils");
// Load DynamicProto
modules.add("@microsoft/dynamicproto-js", "./node_modules/@microsoft/dynamicproto-js/dist/es5/umd/dynamicproto-js", true);
// Load Core
modules.add("@microsoft/applicationinsights-core-js", "./node_modules/@microsoft/applicationinsights-core-js/browser/es5/applicationinsights-core-js");
// Load Common
modules.add("@microsoft/applicationinsights-common", "./node_modules/@microsoft/applicationinsights-common/browser/es5/applicationinsights-common");
modules.add("react-native");
// Load React native device info
modules.add("react-native-device-info", "./node_modules/react-native-device-info/lib/commonjs/web/index");
var testModule = modules.add("Tests/Unit/src/reactnativeplugin.tests", "./Unit/dist/reactnativeplugin.tests.js")
testModule.run = function (tests) {
console && console.log("Starting tests");
QUnit.start();
tests.runTests();
};
modules.run();
</script>
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<div id="error-message"></div>
</body>
</html>