Upgrade the testing framework to allow multiple tests

This commit is contained in:
Caleb James DeLisle
2017-12-20 18:36:53 +01:00
parent d54a010bf4
commit c928be028a
4 changed files with 58 additions and 9 deletions

View File

@@ -1,6 +1,9 @@
// This is stage 1, it can be changed but you must bump the version of the project.
// Note: This must only be loaded from inside of a sandbox-iframe.
define(['/common/requireconfig.js'], function (RequireConfig) {
define([
'/common/requireconfig.js',
'/common/test.js'
], function (RequireConfig, Test) {
require.config(RequireConfig());
// most of CryptPad breaks if you don't support isArray
@@ -23,5 +26,10 @@ define(['/common/requireconfig.js'], function (RequireConfig) {
window.CRYPTPAD_INSIDE = true;
// This test is for keeping the testing infrastructure operating
// until all tests have been registered.
// This test is completed in common-interface.js
Test(function (t) { Test.__ASYNC_BLOCKER__ = t; });
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
});