]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/karma-test-main.js
Update tests to work with new structure
[mirror_novnc.git] / tests / karma-test-main.js
diff --git a/tests/karma-test-main.js b/tests/karma-test-main.js
new file mode 100644 (file)
index 0000000..35b4697
--- /dev/null
@@ -0,0 +1,18 @@
+var TEST_REGEXP = /test\..*\.js/;
+var allTestFiles = [];
+
+Object.keys(window.__karma__.files).forEach(function (file) {
+    if (TEST_REGEXP.test(file)) {
+        // TODO: normalize?
+        allTestFiles.push(file);
+    }
+});
+
+require.config({
+    baseUrl: '/base',
+    deps: allTestFiles,
+    callback: window.__karma__.start,
+    paths: {
+        'sinon': 'vendor/sinon',
+    },
+});