Skip to content

Commit

Permalink
test(Core): decreased timeout expectation times
Browse files Browse the repository at this point in the history
  • Loading branch information
alisahinozcelik committed Dec 28, 2019
1 parent 81aceae commit 851b799
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/function/debounce.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('Debounce Function', () => {
const executedIn = new Date().getTime() - started;

expect(foo).toBe(1);
expect(executedIn).toBeGreaterThan(49);
expect(executedIn).toBeGreaterThan(48);
expect(executedIn).toBeLessThan(60);

done();
Expand Down
2 changes: 1 addition & 1 deletion src/function/proto/debounce.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Debounce Proto Function', () => {
foo.debounce(50, bar, 0, 0)
.then(() => {
const sequence = new Date().getTime() - startedAt;
expect(sequence).toBeGreaterThan(49);
expect(sequence).toBeGreaterThan(48);
expect(sequence).toBeLessThan(60);

expect(bar.x).toBe(8);
Expand Down
6 changes: 3 additions & 3 deletions src/open-promise.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Open Promise Class', () => {
const startedAt = new Date().getTime();

op.promise.then(value => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
expect(value).toBe(1);
done();
});
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('Open Promise Class', () => {
const startedAt = new Date().getTime();

op.promise.then(val => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
expect(val).toBe(1);
done();
});
Expand All @@ -106,7 +106,7 @@ describe('Open Promise Class', () => {
throw new CustomError('bar');
})
.catch((err: CustomError) => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
expect(err.message).toBe('foo');
done();
});
Expand Down
4 changes: 2 additions & 2 deletions src/promise/static/timeout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Promise Timeout Static Function', () => {

Promise.timeout(50)
.then(() => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
done();
});
});
Expand All @@ -22,7 +22,7 @@ describe('Promise Timeout Static Function', () => {

Promise.timeout(50, 'foo')
.then(val => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
expect(val).toBe('foo');
done();
});
Expand Down
4 changes: 2 additions & 2 deletions src/promise/timeout.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Timeout Promise Function', () => {

timeout(50)
.then(() => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
done();
});
});
Expand All @@ -22,7 +22,7 @@ describe('Timeout Promise Function', () => {

timeout(50, 'foo')
.then(val => {
expect(new Date().getTime() - startedAt).toBeGreaterThan(49);
expect(new Date().getTime() - startedAt).toBeGreaterThan(48);
expect(val).toBe('foo');
done();
});
Expand Down

0 comments on commit 851b799

Please sign in to comment.