Skip to content

Can I test the app directly, instead of an individual route? #225

Closed
@nikoschon

Description

@nikoschon
describe('Jest setup', () => {
  test('Get all accounts', async () => {
    const request = createRequest({
      method: 'GET',
      url: '/api/accounts',
    });
    const response = createResponse();

    await app(request, response);

    console.log(response._getData());
  });
});

The route is hit after the end of test.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions