Skip to content

[RFC] Analysis of lifecycle methods#1474

Merged
paulmelnikow merged 5 commits intobetafrom
rfc-001
Mar 13, 2019
Merged

[RFC] Analysis of lifecycle methods#1474
paulmelnikow merged 5 commits intobetafrom
rfc-001

Conversation

@paulmelnikow
Copy link
Copy Markdown
Member

This pulls the analysis material from #1441 (see #1441 (comment)).

I don't think there are any pending comments from #1441.

I've wordsmithed it a little bit.

# Analysis of lifecycle methods

![](https://img.shields.io/badge/rfc-NOCK--001-blue.svg)
![](https://img.shields.io/badge/status-draft-orange.svg)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We could also leave this as a "draft" for a bit to let it bake for a while before we accept it. Or go ahead and accept it now. I don't feel strongly either way. If there are no objections let's merge it as a draft.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 or draft

@paulmelnikow
Copy link
Copy Markdown
Member Author

I'd like to get started on pulling in the proposals! Any objection to merging this?

Copy link
Copy Markdown
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

ooopsies sorry I had this review open but must have forgotten to send it :(

rfcs/NOCK-001.md Outdated
@@ -0,0 +1,43 @@
# Analysis of lifecycle methods

![](https://img.shields.io/badge/rfc-NOCK--001-blue.svg)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe just rfc: 001?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

updated!

# Analysis of lifecycle methods

![](https://img.shields.io/badge/rfc-NOCK--001-blue.svg)
![](https://img.shields.io/badge/status-draft-orange.svg)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 or draft

rfcs/rfc-001.md Outdated

| Use case | Code | Assessment |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Assert that all mocks have been satisfied | `scopes.forEach(scope => scope.done())`. When using `nockBack`, `assert.deepEqual(scope.pendingMocks(), [])` | `done()` could have a more explicit name, though otherwise this is fairly clear. However it requires the caller to keep track of all the scopes, which is not ideal. |
Copy link
Copy Markdown
Member Author

@paulmelnikow paulmelnikow Mar 10, 2019

Choose a reason for hiding this comment

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

I added a sentence here about nockBack that comes from the discussion at #1476.

@paulmelnikow paulmelnikow merged commit 9e9e65d into beta Mar 13, 2019
@paulmelnikow paulmelnikow deleted the rfc-001 branch March 13, 2019 04:14
@nockbot
Copy link
Copy Markdown
Collaborator

nockbot commented Apr 12, 2019

🎉 This PR is included in version 11.0.0-beta.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nockbot
Copy link
Copy Markdown
Collaborator

nockbot commented Aug 13, 2019

🎉 This PR is included in version 11.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants