avajs / pretty-format

:sparkles: Stringify any JavaScript value
ISC License
1 stars 7 forks source link

Don't print non-enumerable symbols #3

Open novemberborn opened 7 years ago

novemberborn commented 7 years ago

When printing objects, only enumerable property names are printed. This seems reasonable. However, all property symbols are printed, whether they're enumerable or not.

As suggested by @caesarsol in https://github.com/avajs/pretty-format/pull/2#issuecomment-280309497.

vadimdemedes commented 7 years ago

I agree, if it doesn't affect assertion, it shouldn't be printed. They aren't enumerable, so it's kind of by definition that we shouldn't list them.