Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Document module/test context and additional properties of lifecycle argument in module calls #63

@jzaefferer

Description

@jzaefferer

We have a neat method of sharing code and objects between tests that existed for a long time, but was never documented:

QUnit.module( "setup test", {
    setup: function() {
        this.prop = "foo";
    },
    method: function() {
        return "bar";
    }
});

QUnit.test( "module with setup", function( assert ) {
    assert.ok( this.prop );
    assert.ok( this.method() );
});

In ember-qunit, this is used to provide helpers via moduleForComponent and other methods. We should document this, at least as part of QUnit.module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions