Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('schemaToJSON', () => {
const testSchema = new Schema({
nodes: pick(nodes, ['doc', 'paragraph', 'text']),
marks: pick(marks, ['em', 'strong']),
});
expect(schemaToJSON(testSchema)).toMatchSnapshot();
});
test('#clone', () => {
const cloned = hsl.clone();
expect(cloned).not.toBe(hsl);
expect(pick(hsl, ['h', 's', 'l', 'a'])).toEqual(pick(cloned, ['h', 's', 'l', 'a']));
});
test('schemaToJSON', () => {
const testSchema = new Schema({
nodes: pick(nodes, ['doc', 'paragraph', 'text']),
marks: pick(marks, ['em', 'strong']),
});
expect(schemaToJSON(testSchema)).toMatchSnapshot();
});
const pickTextProps = (props: GProps) => pick(props, keys as any);
const omitTextProps = (props: GProps) => omit(props, keys as any);
callback: (fn: (content: ReturnValueCallbackParams) => void) => {
fn({ ...pick(returnValue, ['start', 'end', 'state', 'view', 'schema', 'selection', 'doc']), debug });
return createReturnValue();
},