MCPcopy
hub / github.com/websanova/js-url / done

Function done

lib/qunit/qunit.js:827–889  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

825};
826
827function done() {
828 config.autorun = true;
829
830 // Log the last module results
831 if ( config.currentModule ) {
832 runLoggingCallbacks( 'moduleDone', QUnit, {
833 name: config.currentModule,
834 failed: config.moduleStats.bad,
835 passed: config.moduleStats.all - config.moduleStats.bad,
836 total: config.moduleStats.all
837 } );
838 }
839
840 var banner = id("qunit-banner"),
841 tests = id("qunit-tests"),
842 runtime = +new Date() - config.started,
843 passed = config.stats.all - config.stats.bad,
844 html = [
845 'Tests completed in ',
846 runtime,
847 ' milliseconds.<br/>',
848 '<span class="passed">',
849 passed,
850 '</span> tests of <span class="total">',
851 config.stats.all,
852 '</span> passed, <span class="failed">',
853 config.stats.bad,
854 '</span> failed.'
855 ].join('');
856
857 if ( banner ) {
858 banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
859 }
860
861 if ( tests ) {
862 id( "qunit-testresult" ).innerHTML = html;
863 }
864
865 if ( config.altertitle && typeof document !== "undefined" && document.title ) {
866 // show ✖ for good, ✔ for bad suite result in title
867 // use escape sequences in case file gets loaded with non-utf-8-charset
868 document.title = [
869 (config.stats.bad ? "\u2716" : "\u2714"),
870 document.title.replace(/^[\u2714\u2716] /i, "")
871 ].join(" ");
872 }
873
874 // clear own sessionStorage items if all tests passed
875 if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
876 for (var key in sessionStorage) {
877 if (sessionStorage.hasOwnProperty(key) && key.indexOf("qunit-test-") === 0 ) {
878 sessionStorage.removeItem(key);
879 }
880 }
881 }
882
883 runLoggingCallbacks( 'done', QUnit, {
884 failed: config.stats.bad,

Callers 1

processFunction · 0.85

Calls 2

runLoggingCallbacksFunction · 0.85
idFunction · 0.85

Tested by

no test coverage detected