tapjs/tcompare

format should sort object properties

Closed this issue · 1 comments

Format should sort object properties, otherwise tests can fail when comparing formatted objects with changed order of properties. I am not sure if this issue belongs here or in tap.

Yep! This landed on 6dba29e. Just pass in {sort: true} as an option, and it'll do that.

const {format} = require('tcompare')
format(object, { sort: true })