treeify icon indicating copy to clipboard operation
treeify copied to clipboard

[FEAT][FIX] jest + fixes #7 + custom value serializer

Open huafu opened this issue 7 years ago • 3 comments

This PR does the following:

  • uses Jest for tests instead of Vows
  • drop support to node < 6 (Jest requires node >= 6)
  • fixes #7
  • allow showValues option of asTree() and asLines() to be a function, in which case it'll be used to render values.

I wanted and tried to write tests for my fixes and feature using Vows, but I found it hard to understand and change (not to blame the way @notatestuser wrote tests but blaming Vows itself here). Also the vows version was not standard and I couldn't make the tests to pass originally.

So I decided to totally drop Vows in favor to Jest, a more well known and used test runner/lib. Tho I tried to re-wrote the tests as close as possible to the way original ones were written.

If this will make you (@notatestuser) drop my PR, I guess I'll keep "treeify": "github:huafu/treeify" in the package.json of the repo where I use your tool. But sorry, I can't spend more time trying to make original Vows tests to work :-/

huafu avatar Jul 09 '18 10:07 huafu

I've spent a lot of time trying to update the vows test in this repo myself, thanks a lot for having more of a crack at it. I'll take a look and hopefully merge this for a major release!

notatestuser avatar Jul 09 '18 20:07 notatestuser

@notatestuser any news on this?

huafu avatar Sep 12 '18 07:09 huafu

@notatestuser still mastering the tests? :stuck_out_tongue:

resynth1943 avatar Jan 07 '21 19:01 resynth1943