Skip to content

Power-assert with wallaby.js? #754

@studds

Description

@studds

Issue description or question

Power-assert provides descriptive assertion messages through standard assert interface. To do this, power-assert transform test code to look for calls to assert and enhance them. I'm wondering how to get this working with wallaby.js?

It's pretty simple to add power-assert to the compiler pipeline including sourcemap (an example taking the result from ts-node and passing it through power-assert: https://github.com/tracecomms/espower-ts-node). I'm not sure how ranges would need to be created in a custom compiler.

Is power-assert support something that could be added to wallaby.js?

Wallaby.js configuration file

module.exports = function () {
    return {
        files: [
            'src/**/*.ts',
            { pattern: 'src/**/*.unit.ts', ignore: true }
        ],

        tests: [
            'src/**/*.unit.ts'
        ],
        testFramework: 'mocha',
        env: {
            type: 'node'
            // More options are described here
            // http://wallabyjs.com/docs/integration/node.html
        }
    };
};

Code editor or IDE name and version

WebStorm v11
Atom v1.x

OS name and version

OSX

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