Sha256: 46a74a0ebee41f59be826b0bb23f9304654ed4c80e840347fbd99cb4c227388a
Contents?: true
Size: 378 Bytes
Versions: 26
Compression:
Stored size: 378 Bytes
Contents
import { jsonParse } from './jsonParse' test('parses a given valid JSON string', () => { expect(jsonParse(`{"property":"value"}`)).toEqual({ property: 'value', }) }) test('returns undefined without an error given an invalid JSON string', () => { const parse = () => jsonParse(`{"property:val"ue$}`) expect(parse).not.toThrow() expect(parse()).toBeUndefined() })
Version data entries
26 entries across 26 versions & 1 rubygems