Skip to content

Newbie needing advice on handling exceptions in a node unit. #49

@rquadling

Description

@rquadling

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 rquadling/grunt-html2js#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions