diff --git a/npm/svelte/README.md b/npm/svelte/README.md index a77038432b2f..3f1e6be7b4f0 100644 --- a/npm/svelte/README.md +++ b/npm/svelte/README.md @@ -1,13 +1,13 @@ # @cypress/svelte -Mount Svelte components in the open source [Cypress.io](https://www.cypress.io/) test runner **v10.6.0+** +Mount Svelte components in the open source [Cypress.io](https://www.cypress.io/) test runner **v10.7.0+** > **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Svelte Component Testing Docs](https://docs.cypress.io/guides/component-testing/quickstart-svelte#Configuring-Component-Testing) for mounting Svelte components. Installing and importing `mount` from `@cypress/svelte` should only be used for advanced use-cases. ## Install - Requires Svelte >= 3 -- Requires Cypress v10.6.0 or later +- Requires Cypress v10.7.0 or later - Requires [Node](https://nodejs.org/en/) version 12 or above ```sh @@ -32,7 +32,7 @@ For more information, please check the official docs for [running Cypress](https ```js import { mount } from '@cypress/svelte' -import { HelloWorld } from './HelloWorld.svelte' +import HelloWorld from './HelloWorld.svelte' describe('HelloWorld component', () => { it('works', () => { diff --git a/system-tests/project-fixtures/svelte/cypress/support/commands.js b/system-tests/project-fixtures/svelte/cypress/support/commands.js deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/system-tests/project-fixtures/svelte/cypress/support/component.js b/system-tests/project-fixtures/svelte/cypress/support/component.js index ea6d24fc5bf6..e545642795cf 100644 --- a/system-tests/project-fixtures/svelte/cypress/support/component.js +++ b/system-tests/project-fixtures/svelte/cypress/support/component.js @@ -1,28 +1,4 @@ -// *********************************************************** -// This example support/component.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import "./commands"; - -// Alternatively you can use CommonJS syntax: -// require('./commands') - import { mount } from "cypress/svelte"; import "../../src/styles.css" Cypress.Commands.add("mount", mount); - -// Example use: -// cy.mount(MyComponent)