Skip to content

Commit

Permalink
fix(build): fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsimbalar committed Feb 23, 2021
1 parent 7388b08 commit da6d3a5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/infra/codemagic/__tests__/AppRepository.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,25 @@ describe('AppRepository', () => {
expect(actual).not.toHaveLength(0);

// check one that we know will exist
const specificApp = actual.find((s) => s.name === 'koa-flutter');
const specificApp = actual.find((s) => s.name === 'Perspectives');
expect(specificApp).toBeDefined();
expect(specificApp).toEqual<App>({
id: '60101f30cb2f384082f476a4',
name: 'koa-flutter',
webUrl: 'https://codemagic.io/app/60101f30cb2f384082f476a4',
id: '5fc6539af7698e06abe1bed1',
name: 'Perspectives',
webUrl: 'https://codemagic.io/app/5fc6539af7698e06abe1bed1',
workflows: expect.anything(),
});

const workflows = specificApp!.workflows;

// it should find "the default one"
expect(workflows).toContainEqual<Workflow>({
id: '60101f30cb2f384082f476a3',
id: '5fc6539af7698e06abe1bed0',
name: 'Default Workflow',
});

// it should find yaml one
expect(workflows).toContainEqual<Workflow>({
id: 'pull-request',
name: 'PR Checks',
});
expect(workflows).toContainEqual<Workflow>({ id: 'pull-request', name: 'PR checks' });
}, 20000 /* this may take a while */);
});
});

0 comments on commit da6d3a5

Please sign in to comment.