I am trying to load QUnit in js but the addevent function in QUnit.js is never fired, and it's just not working:
var appendQUnit = document.createElement('script');
appendQUnit.src = 'js/utility/qunit/qunit.js';
appendQUnit.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(appendQUnit);
You might need also to call QUnit.load() in order to initialize QUnit:
$.getScript('js/utility/qunit/qunit.js', function(){
QUnit.load();
// here you can handle the qunit code
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With