Skip to content

Conversation

@bioball
Copy link
Member

@bioball bioball commented Apr 4, 2024

No description provided.

Copy link
Collaborator

@holzensp holzensp left a comment

Choose a reason for hiding this comment

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

One suggestion; otherwise LGTM

Comment on lines 405 to 425
== Future improvements: power assertions

Testing in Pkl is already tremendously useful.
With that said, there is still room improvements.

One feature that we would like to implement is power assert style reporting.
Power assertions are a form of reporting that displays a diagram that shows parts of the syntax tree, and their resolved values.

A power-assertion report might look like:

[source]
----
module test
math ❌
num1 == num2 ❌
| | |
| false |
1 2
----

Frameworks that provide power assertions include link:https://github.com/spockframework/spock[Spock], link:https://github.com/power-assert-js/power-assert[power-assert-js], and link:https://github.com/kishikawakatsumi/swift-power-assert[swift-power-assert].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this is currently "only" on the long-term wish-list, it might be useful to say what problem it solves (the lack of information when one of the facts fails) and how to work around it now with trace? [Non-blocking]

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point!

@bioball bioball merged commit c2ee81b into apple:main Apr 10, 2024
@bioball bioball deleted the add-test-blog branch April 10, 2024 00:06
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