Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: increase test timeout #846

Merged
merged 1 commit into from Dec 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/test/index.ts
Expand Up @@ -1073,7 +1073,7 @@ describe('getAll() method', () => {
expect(actualErrorAttempts).to.deep.eq(expectedErrorAttempts);
});
});
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally do this.timeout(5000); inside the function, it may be more readable than this, but up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't compile for me:

test/watch.ts(865,5): error TS7041: The containing arrow function captures the global value of 'this'.
test/watch.ts(865,10): error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

If I want to do this, I have to use function() {..} somewhere in my test initialization (e.g. in the describe call). Rather than do this, I prefer to leave it as is.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we use function instead of arrow-style functions if we need to set this.timeout(). That's OK to leave it as is.

}).timeout(5000);

it('requires at least one argument', () => {
return createInstance().then(firestore => {
Expand Down