-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
58 lines (32 loc) · 1.39 KB
/
index.js
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
console.log("Loading client module.");
/** It needs to be dynamic!! */
// Loading the tests
import {Configs, testLoader} from './configs';
/* TODO: THIS IS REALLY IMPORTANT TO FIX TO HAVE DYNAMIC LOADING OF TESTS */
import {jsEsgrimaGroups} from '../examples/config';
import {EsgrimaTestSuite} from '../examples/tests';
/*
var EsgrimaTestSuite = require("../"+testLoader+"/config").EsgrimaTestSuite;
var jsEsgrimaGroups = require("../"+testLoader+"/tests").jsEsgrimaGroups;
*/
import {EventProcessor} from './EventProcessor';
import {EsgrimaInstance} from './esgrima';
import {fsm, setEventProcessor} from './handlers/ClientStateMachine';
import {appEnv} from '../common/enviroment';
var EventProcessorInstance = {};
if (appEnv.env !== 'node') {
document.addEventListener("DOMContentLoaded", function(event) {
//do work
console.log("### Starting Event Processor Instance");
//setTimeout(function () {
var testSuiteList = EsgrimaInstance.getTests();
console.log("Loading with EsgrimaJSLoader");
console.log(testSuiteList);
EventProcessorInstance = new EventProcessor(EsgrimaInstance);
setEventProcessor(EventProcessorInstance);
// Now it is waiting for events! :D gotta go!
EventProcessorInstance.start();
//}, 3000);
});
}
export {EventProcessorInstance}