Skip to content

Inversion of Control #322

@JWMB

Description

@JWMB

Has there been any discussion on making the individual tests more isolated/stand-alone from the rest of the framework?

I'm looking to host some of these tasks within a game-like environment (a WiP continuation / OSS version of the now-defunct Vektor where users train various cognitive tasks. On certain days in the training plan, they start the session by doing a test suite, and I want to expand on the tests I already have with ones from e.g. Levante/ROAR.

I've customized JsPsych so I can have better control over the execution, but using individual tests from this repo seems difficult, since there are many hard dependencies on the framework.

One way to facilitate this type of usage would be to inject the framework dependencies instead, e.g. instead of import { jsPsych } from '../taskSetup';, jsPsych would be an argument to the function (preferably typed as an interface rather than a concrete implementation).

(I'm not a JS/TS developer so maybe a different pattern is more idiomatic.)

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