File tree 4 files changed +77
-8
lines changed
4 files changed +77
-8
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ module.exports = {
16
16
'vite.config.mts' ,
17
17
'*.bk.vue' ,
18
18
'cypress/**/*' ,
19
+ '**/**/*.cy.ts' ,
19
20
] ,
20
21
overrides : [
21
22
{
Original file line number Diff line number Diff line change 1
1
import { defineConfig } from "cypress" ;
2
2
3
3
export default defineConfig ( {
4
- component : {
5
- devServer : {
6
- framework : "vue" ,
7
- bundler : "vite" ,
8
- } ,
9
- } ,
10
- viewportHeight : 768 ,
11
- viewportWidth : 1024 ,
4
+ component : {
5
+ devServer : {
6
+ framework : "vue" ,
7
+ bundler : "vite" ,
8
+ } ,
9
+ } ,
10
+
11
+ viewportHeight : 768 ,
12
+ viewportWidth : 1024 ,
13
+
14
+ e2e : {
15
+ setupNodeEvents ( on , config ) {
16
+ // implement node event listeners here
17
+ } ,
18
+ } ,
12
19
} ) ;
Original file line number Diff line number Diff line change
1
+ // ***********************************************************
2
+ // This example support/e2e.ts is processed and
3
+ // loaded automatically before your test files.
4
+ //
5
+ // This is a great place to put global configuration and
6
+ // behavior that modifies Cypress.
7
+ //
8
+ // You can change the location of this file or turn off
9
+ // automatically serving support files with the
10
+ // 'supportFile' configuration option.
11
+ //
12
+ // You can read more here:
13
+ // https://on.cypress.io/configuration
14
+ // ***********************************************************
15
+
16
+ // Import commands.js using ES2015 syntax:
17
+ import './commands'
18
+
19
+ // Alternatively you can use CommonJS syntax:
20
+ // require('./commands')
Original file line number Diff line number Diff line change
1
+ import { VCodeBlock } from '../index' ;
2
+ import {
3
+ mount ,
4
+ } from 'cypress/vue' ;
5
+
6
+ // const errorMessage = '[vue-code-block]: You must set either the prismjs or highlightjs props.';
7
+
8
+ describe ( 'Highlight.js' , ( ) => {
9
+
10
+ it ( 'should render js' , ( ) => {
11
+ // see: https://on.cypress.io/mounting-vue
12
+ mount ( VCodeBlock , {
13
+ props : {
14
+ code : 'const foo = "bar"\nconsole.log(foo)' ,
15
+ highlightjs : true ,
16
+ }
17
+ } ) ;
18
+ } ) ;
19
+
20
+
21
+ // it('render html', () => {
22
+ // mount(VCodeBlock, {
23
+ // props: {
24
+ // code: `<html>
25
+ // <head>
26
+ // <title>Document</title>
27
+ // </head>
28
+ // <body>
29
+ // <h1>Hello World</h1>
30
+ // </body>
31
+ // </html>`,
32
+ // highlightjs: true,
33
+ // lang: 'html'
34
+ // }
35
+ // });
36
+ // });
37
+
38
+ } ) ;
39
+
40
+
41
+ // const errorMessage = '[vue-code-block]: You must set either the prismjs or highlightjs props.';
You can’t perform that action at this time.
0 commit comments