tiptap/tests/cypress/integration/core/isClass.spec.ts
2021-01-20 15:35:25 +01:00

20 lines
396 B
TypeScript

/// <reference types="cypress" />
import isClass from '@tiptap/core/src/utilities/isClass'
describe('isClass', () => {
it('returns true for classes', () => {
const instance = new (class {
public foo = 'bar'
})()
expect(isClass(instance)).to.eq(true)
})
it('return false for objects', () => {
const instance = {}
expect(isClass(instance)).to.eq(false)
})
})