mirror of
https://github.com/codex-team/editor.js
synced 2024-05-06 08:33:20 +02:00
585e01b06c
* Initial commit * Fixed test.html file * Create editor instance in the test * Assert paragraph data in editor instance * Moving cypress folder to test folder * Minor Fixes * Removed config test for now * Fixed example.html * Fixed editor.js dist path * Minor Fixes * Stored Host in a const * Add nodemon and Fix commands * Add and configure cypress eslint plugin * Updated Tests according to best practices * Minor FIxes * Minor FIxes * adjust eslint and ts * Update .eslintrc * improve config * debug tests * fix tests * Fix declarations * descrease debounce * rm timeout * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Peter Savchenko <specc.dev@gmail.com> Co-authored-by: George Berezhnoy <gohabereg@gmail.com>
24 lines
652 B
TypeScript
24 lines
652 B
TypeScript
// in cypress/support/index.d.ts
|
|
// load type definitions that come with Cypress module
|
|
/// <reference types="cypress" />
|
|
|
|
import type { EditorConfig } from './../../../types/index';
|
|
import type EditorJS from '../../../types/index'
|
|
|
|
declare global {
|
|
namespace Cypress {
|
|
interface Chainable<Subject = any> {
|
|
/**
|
|
* Custom command to select DOM element by data-cy attribute.
|
|
* @param editorConfig - config to pass to the editor
|
|
* @example cy.createEditor({})
|
|
*/
|
|
createEditor(editorConfig: EditorConfig): Chainable<EditorJS>
|
|
}
|
|
|
|
interface ApplicationWindow {
|
|
EditorJS: typeof EditorJS
|
|
}
|
|
}
|
|
}
|