question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I made a fuzz-test thingy

See original GitHub issue

Branch: https://github.com/lydell/prettier/tree/esfuzz

Using: https://github.com/estools/esfuzz/

Command: npm run fuzz.

It generates a random program and then runs it through prettier two times. No errors are supposed to be thrown, and the two outputs from prettier are supposed to be equal.

It prints the following:

<random JS>
─────────────────────────────────────
<prettier JS or parse errors or diff>
─────────────────────────────────────
<random prettier options>
─────────────────────────────────────
<message>

You can easily work with the results if you find something interesting:

  • The random JS is written to fuzz/random.js
  • The first prettier run-through is written to fuzz/prettier1.js
  • The second prettier run-through is written to fuzz/prettier2.js

Example:

screenshot from 2017-01-21 23-01-25

Feel free to close this if it is of no use πŸ˜ƒ I’ll play around with it and see if I find anything interesting.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
vjeuxcommented, Jan 29, 2017

Awesome! Thanks for all your work on it πŸ˜ƒ

Let’s close this issue. Feel free to open up more bugs you find with it!

1reaction
vjeuxcommented, Jan 22, 2017

This is awesome! Can’t wait to see what you find.

If you look at run_spec.js we already have the infra to make sure that the ast before and after pretty print is the same

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Fuzz Testing [Complete Guide] - Code Intelligence
Fuzz Testing is a dynamic testing method used to find functional bugs and security issues in software.
Read more >
Fuzz Testing: the Complete Guide about Fuzzing
In this blog post you'll discover what is fuzz testing, also known as fuzzing, and all types of fuzz testing that exist with...
Read more >
A guide to fuzz testing - Testfully
Fuzz testing is a type of automated software testing; a method of discovering bugs in software by providing random input to the softwareΒ ......
Read more >
Evaluating Fuzz Testing - YouTube
Fuzz testing has enjoyed great success at discovering security critical bugs in real software. Recently, researchers have devotedΒ ...
Read more >
What Is Fuzz Testing and How Does It Work? - Synopsys
Fuzz testing or fuzzing is an automated software testing method that injects ... According to fuzzing.info, the term β€œfuzz” was created by Professor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found