UNPKG

jsonbinpack

Version:

A space-efficient schema-driven binary JSON serialization format based on JSON Schema

19 lines (18 loc) 646 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var tap_1 = __importDefault(require("tap")); var mapper_1 = require("../../lib/mapper"); tap_1.default.test('should encode an any value', function (test) { var schema = {}; var result = mapper_1.getEncoding(schema, 0); test.is(mapper_1.getStates(schema), Infinity); test.strictSame(result, { type: 'any', encoding: 'ANY_PACKED_TYPE_TAG_BYTE_PREFIX', options: {} }); test.end(); });