Skip to content

Add a testing strategy based on mongo mocking #38

@tmeasday

Description

@tmeasday

Here is some code that I've used:

Example test:

it('creates builds in the right state', async () => {
  const { createBuild: build } = await runQuery(
    db,
    gql`
      mutation {
        createBuild(input: { appId: "${appId}" }) {
          status
        }
      }
    `
  );

  expect(build).toEqual({
    status: 'BUILD_IN_PROGRESS',
  });
});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions