Passed
Push — master ( 92cf80...05c5b5 )
by Michael
02:48
created

testmodule.js ➔ testJsonAgainstSchema   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 1
rs 10
c 1
b 0
f 0
1
import { Node } from 'prosemirror-model';
2
import schema from '../script/schema.js';
3
4
function testJsonAgainstSchema(jsonInput) {
5
    const node = Node.fromJSON(schema, JSON.parse(jsonInput));
6
    node.check();
7
}
8
9
export default testJsonAgainstSchema;
10