-
Notifications
You must be signed in to change notification settings - Fork 88
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
Set deepest nested service to current #231
Conversation
This makes it so that we always use the deepest nested service as the `current`. This is not a breaking change as this is current expected behavior. We were passing `service.child` to be the new current, but not accounting for the possibility of deeply nested machines. Fixes #195
🦋 Changeset detectedLatest commit: 20e68d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
@@ -359,7 +359,7 @@ QUnit.module('Invoke', hooks => { | |||
|
|||
QUnit.test('Invoking a machine that immediately finishes', async assert => { | |||
assert.expect(3); | |||
const expectations = [ 'two', 'nestedTwo', 'three' ]; | |||
const expectations = [ 'nestedTwo', 'three', 'three' ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that this is the expected behaviour. For the next breaking (major) release, I'd say that it makes a lot of sense to have const expectations = [ 'two.nestedTwo', 'three', 'three' ];
because it aligns with the recently added .matches()
API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we collect these somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
This makes it so that we always use the deepest nested service as the
current
.This is not a breaking change as this is current expected behavior. We were passing
service.child
to be the new current, but not accounting for the possibility of deeply nested machines.Fixes #195