jfairbank / redux-saga-test-plan

Test Redux Saga with an easy plan.
http://redux-saga-test-plan.jeremyfairbank.com
MIT License
1.25k stars 127 forks source link

Error when using with Mocha #364

Closed nam-hle closed 3 years ago

nam-hle commented 3 years ago

I can not even run a sample from docs

import { expectSaga } from "redux-saga-test-plan";

function* saga() {
    return { hello: "world" };
}

describe("test", () => {
    it("returns a greeting", () => {
        return expectSaga(saga).returns({ hello: "world" }).run();
    });
});

Command: mocha --timeout 60000 --ui bdd --sort "./lib/**/test/**/*.test.js"

mocha: 7.1.2 redux-saga-test-plan: 4.0.0 node: 10.16.0

Expected: Pass the test Actual: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

jp928 commented 3 years ago

@nam288 I forgot to remove package-lock.json. Is there any chance to try with yarn?

nam-hle commented 3 years ago

Sorry for my late reply. The problem is about Intellij IDE with an async test suite.