Skip to content

Support factory functions for children replace on assertion templates#413

Merged
agubler merged 4 commits intodojo:masterfrom
agubler:set-children-warn-on-array
Jun 25, 2019
Merged

Support factory functions for children replace on assertion templates#413
agubler merged 4 commits intodojo:masterfrom
agubler:set-children-warn-on-array

Conversation

@agubler
Copy link
Copy Markdown
Member

@agubler agubler commented Jun 25, 2019

Type: feature

The following has been addressed in the PR:

Description:

Extends the API for AssertionTemplate methods that work with children to support a function. This is the recommended way to work with these APIs to avoid issues with mutability.

Adds warning that the DNode[] API has been deprecated in favour of using a function () => DNode[].

Warning:

The array API (`children: DNode[]`) has been deprecated. Working with children should use a factory to avoid issues with mutation.

Resolves #333

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.

Assertion templates are not as immutable as expected

2 participants