Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify testStep().session() #24

Open
michaeldfallen opened this issue Aug 31, 2017 · 0 comments
Open

Simplify testStep().session() #24

michaeldfallen opened this issue Aug 31, 2017 · 0 comments

Comments

@michaeldfallen
Copy link
Contributor

In test/util/supertest.js I have written a too complex function that lets users assert against the session as seen in test/steps/EntryPoint.test.js:

    it('creates a session', () => {
      return testStep(redirect)
        .get()
        .session(session => {
          expect(session.active).to.be.true;
        });
    });

It does this by issuing a get request to an endpoint that will return the session json.

If instead the DSL created it's own session store and passed it to sessions.js during wireup then it would be able to directly reference the store and make assertions against it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant