Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -1,6 +1,6 @@
'use strict'
const test = require('tap').test
const { test } = require('node:test')
const validator = require('is-my-json-valid')
const build = require('..')
@@ -16,8 +16,8 @@ test('render a string with surrogate pairs as JSON:test 1', (t) => {
const stringify = build(schema)
const output = stringify('𝌆')
t.equal(output, '"𝌆"')
t.ok(validate(JSON.parse(output)), 'valid schema')
t.assert.equal(output, '"𝌆"')
t.assert.ok(validate(JSON.parse(output)), 'valid schema')
})
test('render a string with surrogate pairs as JSON: test 2', (t) => {
@@ -32,8 +32,8 @@ test('render a string with surrogate pairs as JSON: test 2', (t) => {
const stringify = build(schema)
const output = stringify('\uD834\uDF06')
t.equal(output, '"𝌆"')
t.ok(validate(JSON.parse(output)), 'valid schema')
t.assert.equal(output, '"𝌆"')
t.assert.ok(validate(JSON.parse(output)), 'valid schema')
})
test('render a string with Unpaired surrogate code as JSON', (t) => {
@@ -47,8 +47,8 @@ test('render a string with Unpaired surrogate code as JSON', (t) => {
const validate = validator(schema)
const stringify = build(schema)
const output = stringify('\uDF06\uD834')
t.equal(output, JSON.stringify('\uDF06\uD834'))
t.ok(validate(JSON.parse(output)), 'valid schema')
t.assert.equal(output, JSON.stringify('\uDF06\uD834'))
t.assert.ok(validate(JSON.parse(output)), 'valid schema')
})
test('render a string with lone surrogate code as JSON', (t) => {
@@ -62,6 +62,6 @@ test('render a string with lone surrogate code as JSON', (t) => {
const validate = validator(schema)
const stringify = build(schema)
const output = stringify('\uDEAD')
t.equal(output, JSON.stringify('\uDEAD'))
t.ok(validate(JSON.parse(output)), 'valid schema')
t.assert.equal(output, JSON.stringify('\uDEAD'))
t.assert.ok(validate(JSON.parse(output)), 'valid schema')
})