angular-redux2 / store

integrate your redux store into your Angular
Mozilla Public License 2.0
11 stars 4 forks source link

missing testing structure #1

Closed aribronstein closed 2 years ago

aribronstein commented 3 years ago

It seems like you are missing the /store/testing part of the original library including MockNgRedux and NgReduxTestingModule. Any chance you could and those back in?

Garefild commented 3 years ago

Hi, yes I will post it in the next few days. In general, I work to optimize the code and add new features.

In the coming days, there will be a specific commit to mocks. And hope within a week or two I will post a much more effective and stable version.

If there are any further requests I would love to hear.

Garefild commented 2 years ago

I will add doc later. you can use it like you are use to.

import { MockNgRedux } from "@angular-redux2/store/testing";

const stub = MockNgRedux.getSelectorStub([ 'auth' ]);
    stub.next({
        counter: 5
    });
    stub.complete();

    app.auth$.subscribe(x => {
        expect(x).toEqual({
            counter: 5
        });
        done();
});