* Add test setup function for simulating browser globals
* Add tests for Node._findSchema
Some of the tests currently fail, which will be helpful in fixing the
incorrect behavior of the `_findSchema` function. The current failures
are:
- the last schema in the pattern properties object is always returned
- when pattern properties are present, wrong object schemas are returned
* Add schema-based tooltip to field names
Using the `title` and `description` properties from the schema, create
and set a tooltip on each field name. When the user hovers over a field
name, it will show the applicable information: title, description, both,
or neither, depending on what data is present in the schema.
* Remove redundant setting of field name title
* Remove accidental .only() from Node tests
* Fix Node._findSchema for pattern properties
The method now checks the key against the RegExp specified by the
pattern properties instead of always returning the last pattern property
in the object.
* Fix path used for recursive calls in Node._findSchema
* Add failing Node._findSchema tests for multi-level pattern properties
* Fix Node._findSchema for schemas with properties and patternProperties
Using the `title` and `description` properties from the schema, create
and set a tooltip on each field name. When the user hovers over a field
name, it will show the applicable information: title, description, both,
or neither, depending on what data is present in the schema.
The JSON path parsing code assumes that string keys within square brackets in JSON paths will be valid, parseable JSON.
However, the ajv library on which this project depends emits string keys in single quotes.
For example, ajv can emit .foo['bar'], which will ultimately end up with a call to JSON.parse("'bar'"). This causes the "Unexpected token ' in JSON at position 0" error thrown from JSON.parse.
Since ajv shouldn't need to change and since this utility is gone in the next branch, this fix checks for ajv-formatted string keys and patches them to double-quoted strings before calling JSON.parse. This is the narrowest fix for the problem.