UNPKG

tjson-js

Version:

Tagged JSON (TJSON): a JSON-based microformat with rich type annotations

11 lines (9 loc) 323 B
import { suite, test } from "mocha-typescript"; import { expect } from "chai"; import { ObjectType } from "../../src/datatype/object"; @suite class ObjectTypeTest { @test "parses objects"() { let exampleObj = { "foo": 1, "bar": 2, "baz": 3 }; expect((new ObjectType).decode(exampleObj)).to.eq(exampleObj); } }