mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-27 03:17:50 +08:00
e07a5b625d
* use named exports instead of default exports * fix tests Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
20 lines
400 B
TypeScript
20 lines
400 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)
|
|
})
|
|
})
|