mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-25 10:17:49 +08:00
20 lines
396 B
TypeScript
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)
|
||
|
})
|
||
|
})
|