Skip to content

Conversation

@ChristianMurphy
Copy link
Member

@ChristianMurphy ChristianMurphy commented Feb 14, 2021

this introduces fast-check (https://dubzzz.github.io/fast-check.github.com/) as a way to automatically generate test cases exploring possible edge cases not covered in example based tests

Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

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

This seems like a very different test type. If so, I’d prefer having the current file as test/main.js, the additions as test/property-based.js, and a test/index.js tying them together.

I think bigint shouldn’t be supported in unist, because it can’t be roundtripped with JSON (https://github.com/syntax-tree/unist#node)

The last check looks complex: first a long line (.chain) where it makes a certain format, then a long line (is) where it undoes that work?

@ChristianMurphy
Copy link
Member Author

first a long line (.chain) where it makes a certain format

An arbitrary JSON object. 7ae6376 and 62b6329 try to clarify this

then a long line (is) where it undoes that work?

7ae6376 clarifies this some by splitting up the massive line.
It specifically generates an object with a subset of properties from the original node

@ChristianMurphy ChristianMurphy added the 🕸️ area/tests This affects tests label Feb 14, 2021
ChristianMurphy and others added 5 commits February 14, 2021 10:15
Co-authored-by: Titus <tituswormer@gmail.com>
Co-authored-by: Titus <tituswormer@gmail.com>
Co-authored-by: Titus <tituswormer@gmail.com>
@wooorm
Copy link
Member

wooorm commented Feb 14, 2021

good to go once CI succeeds!

@wooorm wooorm merged commit bd97123 into syntax-tree:main Feb 14, 2021
@ChristianMurphy ChristianMurphy deleted the test/add-property-tests branch February 14, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🕸️ area/tests This affects tests

Development

Successfully merging this pull request may close these issues.

2 participants