简体   繁体   中英

Qunit events with Grunt and alternatives

I'm using grunt-contrib-qunit and I'm trying to find event, which event arguments hold information for a failed test (the error message of the failed assert). As far as I see, this is not possible. In the testDone event, the count of the failed asserts can be found, but nothing more. I have asked them in their GitHub repo , but nobody have answered me. Did anyone know something about it?

Are there some alternative modules that can run QUnit tests and can provide detailed information about the failed asserts?

The 'log' event can be used for that:

You can use QUnit.log(...)

In grunt you can register the following event handler:

grunt.event.on('qunit.log', function (result, actual, expected, message, source) {    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM