gruntjs / gruntjs/grunt-contrib-nodeunit

Newbie needing advice on handling exceptions in a node unit.

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
70
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Hi.

I recently inherited ownership of https://github.com/rquadling/grunt-html2js (the company I work for use it and it was no longer being maintained).

I'm not a JS expert, but I'm learning what I need.

I'm stuck trying to track/catch exceptions / grunt.log.warn / grunt.log.error that the main code can generate in the unit tests such that I can see that the code and tests are working correctly.

Currently, an exception thrown in the code just aborts the whole test run.

If anyone has the time to pop over to the repo and take a look at the test setup and give me any pointers (and raise issues over there), then I'd be happy to learn from this.

Specifically, how to fix https://github.com/rquadling/grunt-html2js/issues/76

I've created a branch with tests, but they are empty at the moment.

https://github.com/rquadling/grunt-html2js/blob/issue_76/test/html2js_test.js#L358

Thanks.

Richard.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.