import test from 'node:test'; import assert from 'node:assert/strict'; import { formatPrice } from '../src/money.js'; test('formats cents as dollars', () => { assert.equal(formatPrice(1899), '$18.99'); assert.equal(formatPrice(5), '$0.05'); assert.equal(formatPrice(0), '$0.00'); }); test('puts the sign before the dollar sign', () => { assert.equal(formatPrice(-250), '-$2.50'); });