Skip to content

Commit dfb7c2e

Browse files
committed
ci: fix testing failures caused by node_module
1 parent 2a7b0d3 commit dfb7c2e

File tree

18 files changed

+47
-80
lines changed
  • .github/workflows
  • playground
    • jsx-pinia-with-tests/cypress/plugins
    • jsx-router-pinia-with-tests/cypress/plugins
    • jsx-router-with-tests/cypress/plugins
    • jsx-with-tests/cypress/plugins
    • pinia-with-tests/cypress/plugins
    • router-pinia-with-tests/cypress/plugins
    • router-with-tests/cypress/plugins
    • typescript-jsx-pinia-with-tests/cypress/plugins
    • typescript-jsx-router-pinia-with-tests/cypress/plugins
    • typescript-jsx-router-with-tests/cypress/plugins
    • typescript-jsx-with-tests/cypress/plugins
    • typescript-pinia-with-tests/cypress/plugins
    • typescript-router-pinia-with-tests/cypress/plugins
    • typescript-router-with-tests/cypress/plugins
    • typescript-with-tests/cypress/plugins
    • with-tests/cypress/plugins
  • utils

18 files changed

+47
-80
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ jobs:
3636
cache: 'pnpm'
3737
- run: pnpm install
3838
- run: pnpm pretest
39+
# Rerun install to ensure the dependencies in the playground apps are resolved correctly
40+
- run: pnpm install
3941
- run: pnpm test

playground/jsx-pinia-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/jsx-router-pinia-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/jsx-router-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/jsx-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/pinia-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/router-pinia-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins

playground/router-with-tests/cypress/plugins/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/// <reference types="cypress" />
43
// ***********************************************************
54
// This example plugins/index.js can be used to load plugins
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
2+
/// <reference types="node" />
33
/// <reference types="cypress" />
44
// ***********************************************************
5-
// This example plugins/index.js can be used to load plugins
5+
// This example plugins/index.ts can be used to load plugins
66
//
77
// You can change the location of this file or turn off loading
88
// the plugins file with the 'pluginsFile' configuration option.
@@ -14,17 +14,13 @@
1414
// This function is called when a project is opened or re-opened (e.g. due to
1515
// the project's config changing)
1616

17-
const { startDevServer } = require('@cypress/vite-dev-server')
17+
import { startDevServer } from '@cypress/vite-dev-server'
1818

19-
/**
20-
* @type {Cypress.PluginConfig}
21-
*/
22-
// eslint-disable-next-line no-unused-vars
23-
module.exports = (on, config) => {
19+
export default ((on, config) => {
2420
// `on` is used to hook into various events Cypress emits
2521
// `config` is the resolved Cypress config
2622
on('dev-server:start', (options) => {
2723
return startDevServer({ options })
2824
})
2925
return config
30-
}
26+
}) as Cypress.PluginConfig
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-env node */
2-
/* eslint-disable @typescript-eslint/no-var-requires */
2+
/// <reference types="node" />
33
/// <reference types="cypress" />
44
// ***********************************************************
5-
// This example plugins/index.js can be used to load plugins
5+
// This example plugins/index.ts can be used to load plugins
66
//
77
// You can change the location of this file or turn off loading
88
// the plugins file with the 'pluginsFile' configuration option.
@@ -14,17 +14,13 @@
1414
// This function is called when a project is opened or re-opened (e.g. due to
1515
// the project's config changing)
1616

17-
const { startDevServer } = require('@cypress/vite-dev-server')
17+
import { startDevServer } from '@cypress/vite-dev-server'
1818

19-
/**
20-
* @type {Cypress.PluginConfig}
21-
*/
22-
// eslint-disable-next-line no-unused-vars
23-
module.exports = (on, config) => {
19+
export default ((on, config) => {
2420
// `on` is used to hook into various events Cypress emits
2521
// `config` is the resolved Cypress config
2622
on('dev-server:start', (options) => {
2723
return startDevServer({ options })
2824
})
2925
return config
30-
}
26+
}) as Cypress.PluginConfig

0 commit comments

Comments
 (0)