Files
boc/services/frilans-payout/node_modules/pino-pretty/lib/utils/split-property-key.test.js
T
Bernt 1a12fb870b dev-api: add developer portal, OpenAPI spec, and Flatenbadet case study
- New /developers/ page with API docs, SDKs, pricing, use cases
- OpenAPI 3.0 spec for Orders, Missions, Photos, Analytics
- Case study: Glasskiosken i Flatenbadet — complete ROI analysis
- Updated /order/ with recurring missions and frequency dropdown
2026-07-14 15:27:33 +00:00

30 lines
1.1 KiB
JavaScript

'use strict'
const tap = require('tap')
const splitPropertyKey = require('./split-property-key')
tap.test('splitPropertyKey does not change key', async t => {
const result = splitPropertyKey('data1')
t.same(result, ['data1'])
})
tap.test('splitPropertyKey splits nested key', async t => {
const result = splitPropertyKey('data1.data2.data-3')
t.same(result, ['data1', 'data2', 'data-3'])
})
tap.test('splitPropertyKey splits nested keys ending with a dot', async t => {
const result = splitPropertyKey('data1.data2.data-3.')
t.same(result, ['data1', 'data2', 'data-3'])
})
tap.test('splitPropertyKey splits nested escaped key', async t => {
const result = splitPropertyKey('logging\\.domain\\.corp/operation.foo.bar-2')
t.same(result, ['logging.domain.corp/operation', 'foo', 'bar-2'])
})
tap.test('splitPropertyKey splits nested escaped key with special characters', async t => {
const result = splitPropertyKey('logging\\.domain\\.corp/operation.!\t@#$%^&*()_+=-<>.bar\\.2')
t.same(result, ['logging.domain.corp/operation', '!\t@#$%^&*()_+=-<>', 'bar.2'])
})