Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Feb 19, 2024
1 parent 08b2b3c commit 376b454
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion spec/result.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,21 +167,39 @@ describe('Result helper', function () {
).toEqual('6 points');
});

it('Correctly Formats 333 Result in Second', function () {
expect(
attemptResultToString({ attemptResult: 100, eventId: '333' }),
).toEqual('1 second');
});

it('Correctly Formats 333 Result in Seconds', function () {
expect(
attemptResultToString({ attemptResult: 3000, eventId: '333' }),
).toEqual('30 seconds');
});

it('Correctly Formats 333 Result in Minute', function () {
expect(
attemptResultToString({ attemptResult: 6000, eventId: '333' }),
).toEqual('1 minute');
});

it('Correctly Formats 333 Result in Minutes', function () {
expect(
attemptResultToString({ attemptResult: 9000, eventId: '333' }),
).toEqual('1 minute 30 seconds');
});

it('Correctly Formats 333 Result in hours', function () {
it('Correctly Formats 333 Result in hour', function () {
expect(
attemptResultToString({ attemptResult: 360000, eventId: '333' }),
).toEqual('1 hour');
});

it('Correctly Formats 333 Result in hours', function () {
expect(
attemptResultToString({ attemptResult: 369000, eventId: '333' }),
).toEqual('1 hour 1 minute 30 seconds');
});
});

0 comments on commit 376b454

Please sign in to comment.