Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoko committed Mar 1, 2021
1 parent 851d63f commit bfb6671
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/analysis.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ describe('further analysis of results', () => {
Must giev us pause - their's the respect
That makes clamity of so long life.`;

const { corrected } = await new Grammarly().analyse(text).then(correct);

const correctText = `When we have shuffled off this mortal coil,
Must give us pause - their's the respect
That makes calamity of so long life.`;

const { corrected } = await new Grammarly().analyse(text).then(correct);

expect(corrected).toEqual(correctText);
});
});
5 changes: 3 additions & 2 deletions tests/api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ describe('api tests', () => {
const server = new Grammarly();

const response = await server.analyse('hello worlds!');

expect(response.alerts.length).toBe(1);
// a hidden alert as we start with hello instead of Hello
// We should use a comma after hello
expect(response.alerts.length).toBe(2);

done();
});
Expand Down

0 comments on commit bfb6671

Please sign in to comment.