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

Update Koa template for latest Koala #44

Merged
merged 2 commits into from
Jun 12, 2020
Merged

Update Koa template for latest Koala #44

merged 2 commits into from
Jun 12, 2020

Conversation

72636c
Copy link
Member

@72636c 72636c commented Jun 12, 2020

No description provided.

@72636c 72636c requested a review from a team as a code owner June 12, 2020 01:47
@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2020

🦋 Changeset is good to go

Latest commit: eb79967

We got this.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +18 to +23
const setup = async () => {
await new Promise((resolve) => (server = app.listen(undefined, resolve)));
agent = request.agent(server);
};

const teardown = (done: () => void) => server.close(done);
const teardown = () => new Promise((resolve) => server.close(resolve));
Copy link
Member Author

Choose a reason for hiding this comment

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

This is mildly unrelated but I noticed it when working on Koala; the promises are a bit more modern, and it means that you can await teardown() along with other things rather than hogging Jest's done callback.

@72636c 72636c merged commit 2169513 into master Jun 12, 2020
@72636c 72636c deleted the koala-4.2 branch June 12, 2020 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants