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

feat: reply after 9s with 202 status #190

Merged
merged 5 commits into from
Aug 15, 2020
Merged

feat: reply after 9s with 202 status #190

merged 5 commits into from
Aug 15, 2020

Conversation

gr2m
Copy link
Contributor

@gr2m gr2m commented Aug 6, 2020

We can test this with https://github.com/sinonjs/fake-timers, without needing to wait for 10s in our tests.

If anynone wants to finish this today be my guest, if not I'll finish this up tomorrow

fixes #185

@oscard0m
Copy link
Member

oscard0m commented Aug 9, 2020

This PR fixes #185 right?

@oscard0m oscard0m added the Type: Feature New feature or request label Aug 9, 2020
@gr2m
Copy link
Contributor Author

gr2m commented Aug 9, 2020

This PR fixes #185 right?

Yes 👍🏼

if not I'll finish this up tomorrow

I think it makes sense to finish up the rewrite of the tests to Jest & TypeScript first :)

@gr2m gr2m self-assigned this Aug 9, 2020
@gr2m
Copy link
Contributor Author

gr2m commented Aug 12, 2020

I'll have to finish this on Friday latest. It might create some merge conflicts with your work on rewriting tests to TypeScript I'm afraid, but I need to finish up Probot v10 and this will become a blocker by then

@oscard0m
Copy link
Member

I'll have to finish this on Friday latest. It might create some merge conflicts with your work on rewriting tests to TypeScript I'm afraid, but I need to finish up Probot v10 and this will become a blocker by then

From my side it's fine. I will be with no laptop for the next to weeks. I would ask to @wolfy1339

@gr2m gr2m changed the title WIP avoid 10s timeout - needs testing feat: reply after 9s with 202 status Aug 15, 2020
@gr2m gr2m merged commit dfdfc46 into master Aug 15, 2020
@gr2m gr2m deleted the 185/avoid-timeout branch August 15, 2020 21:02
@github-actions
Copy link
Contributor

🎉 This PR is included in version 7.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

wolfy1339 added a commit that referenced this pull request Aug 22, 2020
- Pull in the relevant types package for `@sinonjs/fake-timers`
- Convert those tests from tap to Jest
- Add some Typescript types to those tests
wolfy1339 added a commit that referenced this pull request Aug 25, 2020
- Pull in the relevant types package for `@sinonjs/fake-timers`
- Convert those tests from tap to Jest
- Add some Typescript types to those tests
wolfy1339 added a commit that referenced this pull request Aug 25, 2020
- Pull in the relevant types package for `@sinonjs/fake-timers`
- Convert those tests from tap to Jest
- Add some Typescript types to those tests
gr2m pushed a commit that referenced this pull request Aug 25, 2020
* chore(tests): Convert to typescript and use Jest

* chore(lint): Run prettier

* fix: Add missing closing bracket

* chore(lint): Run Prettier

* refactor(tests): Replace some tap with jest equivalents

- Replace `t.ok()` with `expect().toBeTruthy()`
- Replace `t.plan()` with `expect.assertions()`

* chore(package): Add types for simple-mock

* fix(typescript): Make sure to use the simple-mock types

* chore(tests): Migrate integration tests to TypeScript + Jest

* chore(tests): Finish most of the Jest transition

* fix(typescript): Fix some type errors

* fix(tests): Some more fixes

* fix(tests): Get tests to run

* fix(tests): Fix some jest errors

Jest expects functions in the `expect()` function when using the `.toThrow()` property

* fix(tests): Fix some type errors

* refactor: Remove un-needed argument

* fix(tests): Fix various problems in the tests

Fix some types
Replace some remaining tap functions
Ignore some TypeScript type errors, they are there on purpose to test if the function throws an error

* test(integration/middlewares): fix mocks to make tests pass

* test(middleware): add check to assure the number of assertions expected to run are executed

* test(middlewares): fix typing of unit test for middlewares

* ♻️ refactor(jest): use toHaveBeenCalled instead of toHaveBeenCalledTimes(1)

* 🚨 test(event-handler-test): add missing done() callback to make async test to wait until all expect

* tests: Set node environment in Jest config

* test(server-test): mock errorHandler using jest.fn() (#198)

* tests: Fix tests after #190

- Pull in the relevant types package for `@sinonjs/fake-timers`
- Convert those tests from tap to Jest
- Add some Typescript types to those tests

* fix(typescript): Fix some type errors in the tests

* test(types): add missing types to variables and paramters on event-handler-test (#212)

* Fix sign test type compilation error (#213)

* test(server-test): fix typescript errors (#214)

* test(middleware-test): add test coverage for middleware when there is a timeout (#215)

* Revert 2b7c0bb and instead add a ts-ignore statement

Adds back the existing error message that was removed

* build(aggregate-error): upgrade version to support Custom Errors (#233)

* test(sign-test): restore 100% coverage for sign-test (#234)

* fix(sign): make sign() parameters non-optional (#237)

Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make sure to respond within 10s in .middleware
2 participants