javascript - How to programatically inject html to qunit-fixture -
i programatically inject html test qunit-fixture. have tried $.load js dealing html gets executed before html loaded. the html: <div id="qunit"></div> <div id="qunit-fixture"></div> <script src="../components/bower/qunit/qunit/qunit.js"></script> <script> qunit.config.autostart = false; </script> <script data-main="tests" src="../components/bower/requirejs/require.js"></script> the js manipulating html module want test: define(['jquery'], function($) { 'use strict'; var foo = { _init: function() { this._addclass(); }, _addclass: function() { console.log('adding class testit'); $('.foo').addclass('testit'); }, greet: function() { return "hello"; } }; foo._init(); return { greet : foo.greet }; }); and test: define(['foo'], function(foo...