fix(tests): fix failing cypress tests and update cypress

* test: update cypress and migrate configs

* test: fix codeBlockLowlight test

* test: bump cypress actions
This commit is contained in:
Sven Adlung
2022-09-26 11:06:01 +02:00
committed by GitHub
parent 95842e18f6
commit 348383b96c
7 changed files with 31 additions and 19 deletions

12
tests/cypress.config.js Normal file
View File

@@ -0,0 +1,12 @@
const { defineConfig } = require('cypress')
module.exports = defineConfig({
defaultCommandTimeout: 15000,
e2e: {
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:3000',
specPattern: '../{demos,tests}/**/*.spec.{js,ts}',
},
})

View File

@@ -1,6 +0,0 @@
{
"baseUrl": "http://localhost:3000",
"integrationFolder": "../",
"testFiles": "{demos,tests}/**/*.spec.{js,ts}",
"defaultCommandTimeout": 15000
}

View File

@@ -5,7 +5,7 @@ import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight'
import { Document } from '@tiptap/extension-document'
import { Paragraph } from '@tiptap/extension-paragraph'
import { Text } from '@tiptap/extension-text'
import * as lowlight from 'lowlight'
import { lowlight } from 'lowlight'
describe('code block highlight', () => {
let Frontmatter