persona-community-5/.pnpm-store/v3/files/55/db76cac4c66044e0213928885815e7e5891d5b9f26d0af699437c33c9c71436a83087900ffc872b8be334cba8323bfe5873b5cdf08443d5d9e2ccbfa12d273
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

12 lines
335 B
Plaintext

var test = require('tape');
var stringify = require('../');
test('custom comparison function', function (t) {
t.plan(1);
var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };
var s = stringify(obj, function (a, b) {
return a.key < b.key ? 1 : -1;
});
t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}');
});