Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('ReactSerializer.fromExtensionManager', () => {
expect(serializer).toBeInstanceOf(ReactSerializer);
expect(serializer.nodes.paragraph).toBeFunction();
expect(serializer.marks.bold).toBeFunction();
// fills in for a missing text
const altExtensions = [
{ extension: new DocExtension(), priority: 2 },
{ extension: new ParagraphExtension(), priority: 2 },
{ extension: new TextExtension(), priority: 2 },
{ extension: new BoldExtension(), priority: 2 },
{ extension: new CodeBlockExtension(), priority: 2 },
];
const altManager = ExtensionManager.create(altExtensions);
expect(ReactSerializer.fromExtensionManager(altManager).nodes.text).toBeFunction();
});