Skip to content

Add Support for dependency injection #1074

@jsdevel

Description

@jsdevel

It would be really nice to support dependency injection. On the command line, you could add a flag for a provider module path. In a browser you could load a provider before your test scripts. It would probably look like angular's factory pattern.

mocha.factory('someDep', function(){return a;});

//later in my test
describe(function(someDep){
//tests here
});

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