Commit 4fb21029 authored by Boris Kocherov's avatar Boris Kocherov

tests remove schema_test.js

parent 8c5b8f6e
......@@ -9,7 +9,6 @@
<script src="../renderjs.js" type="text/javascript"></script>
<script src="../node_modules/grunt-contrib-qunit/test/libs/qunit.js" type="text/javascript"></script>
<script src="../node_modules/sinon/pkg/sinon.js" type="text/javascript"></script>
<script src="schema_test.js" type="text/javascript"></script>
<script src="jsonform_test.js" type="text/javascript"></script>
</head>
<body>
......
/*jslint nomen: true*/
/*global console, RSVP, renderJS, QUnit, window, document*/
(function (document, renderJS, QUnit) {
"use strict";
var test = QUnit.test,
stop = QUnit.stop,
start = QUnit.start,
ok = QUnit.ok,
expect = QUnit.expect,
// equal = QUnit.equal,
// throws = QUnit.throws,
// deepEqual = QUnit.deepEqual,
module = QUnit.module,
// notEqual = QUnit.notEqual,
root_gadget_defer = RSVP.defer(),
jsonform_url = '../jsonform.gadget.html';
window.module = undefined;
// Keep track of the root gadget
renderJS(window)
.ready(function () {
root_gadget_defer.resolve(this);
});
/////////////////////////////////////////////////////////////////
// declareGadget
/////////////////////////////////////////////////////////////////
module("schema.declareGadget", {
setup: function () {
renderJS.clearGadgetKlassList();
}
});
test('JSON Schema gadget can be loaded', function () {
stop();
expect(1);
root_gadget_defer.promise
.then(function (root_gadget) {
return root_gadget.declareGadget(
jsonform_url,
{
element: document.querySelector('#qunit-fixture')
}
);
})
.then(function (gadget) {
ok(true, gadget);
})
.fail(function (error) {
ok(false, error);
console.warn(error);
throw error;
})
.always(function () {
start();
});
});
}(document, renderJS, QUnit));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment