(schema, toStringify, expected)
| 4 | const build = require('..') |
| 5 | |
| 6 | function buildTest (schema, toStringify, expected) { |
| 7 | test(`render a ${schema.title} with default as JSON`, (t) => { |
| 8 | t.plan(1) |
| 9 | |
| 10 | const stringify = build(schema) |
| 11 | |
| 12 | const output = stringify(toStringify) |
| 13 | |
| 14 | t.assert.equal(output, JSON.stringify(expected)) |
| 15 | }) |
| 16 | } |
| 17 | |
| 18 | buildTest({ |
| 19 | title: 'default string', |
no test coverage detected
searching dependent graphs…