10 lines
362 B
JavaScript
10 lines
362 B
JavaScript
import assert from 'node:assert/strict'
|
|
import test from 'node:test'
|
|
|
|
import { createHttpError } from './http.js'
|
|
|
|
test('preserves HTTP or response envelope status for non-leaking market errors', () => {
|
|
assert.equal(createHttpError({ code: 403, message: '禁止' }, 200).status, 403)
|
|
assert.equal(createHttpError({ detail: 'missing' }, 404).status, 404)
|
|
})
|