Test Context

For functional mocha tests, the test and suite functions get a context passed as this. To obtain it in @testdeck/mocha, use the context symbol as follows:

import { suite, test, context } from "@testdeck/mocha";

@suite
class SuiteContext {

    static async before() {
        this[context].timeout(50);
    }

    @test
    testHasContext(done) {
        this[context].timeout(50);
    }
}