Skip to content

test: add property tests #17

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

Merged
merged 12 commits into from
Feb 14, 2021

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