tiptap/tests/cypress/integration/core/isClass.spec.ts
Philipp Kühn e07a5b625d
refactor: Use named exports instead of default exports (#2238)
* use named exports instead of default exports

* fix tests

Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
2021-12-06 12:00:09 +01:00

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)
})
})