const assert = require('node:assert');
const { parseJsonLoose, parseBboxes, normalizePartName } = require('../scripts/lib/json_utils.cjs');

assert.deepStrictEqual(parseJsonLoose('```json\n{"a":1}\n```'), { a: 1 });
assert.deepStrictEqual(parseBboxes('[1 second] <bbox>1 2 3 4</bbox>'), [[1, 2, 3, 4]]);
assert.strictEqual(normalizePartName('front_right_door'), '右前门');
