Skip to content

Simplify testStep().session() #24

@michaeldfallen

Description

@michaeldfallen

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions