From ea23a8324452903089638c003bd1ed67e29df752 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Tue, 12 Apr 2022 20:19:04 -0400 Subject: [PATCH] fix: add possible frameworks to object API config --- cli/types/cypress.d.ts | 4 ++-- .../cra/{cypress.config.js => cypress.config.ts} | 2 +- .../nuxtjs2/{cypress.config.js => cypress.config.ts} | 6 ++++-- .../vue-cli/{cypress.config.js => cypress.config.ts} | 6 ++++-- 4 files changed, 11 insertions(+), 7 deletions(-) rename system-tests/project-fixtures/cra/{cypress.config.js => cypress.config.ts} (82%) rename system-tests/project-fixtures/nuxtjs2/{cypress.config.js => cypress.config.ts} (56%) rename system-tests/project-fixtures/vue-cli/{cypress.config.js => cypress.config.ts} (57%) diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 7f24171bb9b6..90601088642d 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -2987,11 +2987,11 @@ declare namespace Cypress { type DevServerConfigObject = { bundler: 'webpack' - framework: 'react' + framework: 'react' | 'vue' | 'vue-cli' | 'nuxt' | 'create-react-app' webpackConfig?: PickConfigOpt<'webpackConfig'> } | { bundler: 'vite' - framework: 'react' + framework: 'react' | 'vue' viteConfig?: Omit, undefined>, 'base' | 'root'> } diff --git a/system-tests/project-fixtures/cra/cypress.config.js b/system-tests/project-fixtures/cra/cypress.config.ts similarity index 82% rename from system-tests/project-fixtures/cra/cypress.config.js rename to system-tests/project-fixtures/cra/cypress.config.ts index e820918b5836..97f16a118453 100644 --- a/system-tests/project-fixtures/cra/cypress.config.js +++ b/system-tests/project-fixtures/cra/cypress.config.ts @@ -1,6 +1,6 @@ import { defineConfig } from 'cypress' -module.exports = defineConfig({ +export default defineConfig({ component: { devServer: { framework: 'create-react-app', diff --git a/system-tests/project-fixtures/nuxtjs2/cypress.config.js b/system-tests/project-fixtures/nuxtjs2/cypress.config.ts similarity index 56% rename from system-tests/project-fixtures/nuxtjs2/cypress.config.js rename to system-tests/project-fixtures/nuxtjs2/cypress.config.ts index 8dcda0e05fa7..ffab8db5f08b 100644 --- a/system-tests/project-fixtures/nuxtjs2/cypress.config.js +++ b/system-tests/project-fixtures/nuxtjs2/cypress.config.ts @@ -1,8 +1,10 @@ -module.exports = { +import { defineConfig } from 'cypress' + +export default defineConfig({ component: { devServer: { framework: 'nuxt', bundler: 'webpack' } }, -} +}) \ No newline at end of file diff --git a/system-tests/project-fixtures/vue-cli/cypress.config.js b/system-tests/project-fixtures/vue-cli/cypress.config.ts similarity index 57% rename from system-tests/project-fixtures/vue-cli/cypress.config.js rename to system-tests/project-fixtures/vue-cli/cypress.config.ts index 13a9f89318d0..81ae8085896d 100644 --- a/system-tests/project-fixtures/vue-cli/cypress.config.js +++ b/system-tests/project-fixtures/vue-cli/cypress.config.ts @@ -1,8 +1,10 @@ -module.exports = { +import { defineConfig } from 'cypress' + +export default defineConfig({ component: { devServer: { framework: 'vue-cli', bundler: 'webpack' } }, -} +}) \ No newline at end of file