Skip to content

Commit 6a4b19c

Browse files
committed
Remove instructions about eslint-plugin-cypress as cy doesn't cause eslint error anymore
1 parent 673f35f commit 6a4b19c

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

src/content/5/en/part5e.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -149,41 +149,6 @@ the test fails
149149

150150
Let's remove the failing code from the test.
151151

152-
The variable _cy_ our tests use gives us a nasty Eslint error
153-
154-
![vscode screenshot showing cy is not defined](../../images/5/58new.png)
155-
156-
We can get rid of it by installing [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) as a development dependency
157-
158-
```js
159-
npm install eslint-plugin-cypress --save-dev
160-
```
161-
162-
and changing the configuration in <i>.eslintrc.cjs</i> like so:
163-
164-
```js
165-
module.exports = {
166-
"env": {
167-
browser: true,
168-
es2020: true,
169-
"jest/globals": true,
170-
"cypress/globals": true // highlight-line
171-
},
172-
"extends": [
173-
// ...
174-
],
175-
"parserOptions": {
176-
// ...
177-
},
178-
"plugins": [
179-
"react", "jest", "cypress" // highlight-line
180-
],
181-
"rules": {
182-
// ...
183-
}
184-
}
185-
```
186-
187152
### Writing to a form
188153

189154
Let's extend our tests so that our new test tries to log in to our application.

src/content/5/fi/osa5e.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -144,41 +144,6 @@ havaitsee Cypress ongelman
144144

145145
Poistetaan virheeseen johtanut testi koodista.
146146

147-
Testeissä käytetty muuttuja _cy_ aiheuttaa ikävän ESlint-virheen
148-
149-
![VS code paljastaa ESlint-virheen 'cy' is not defined](../../images/5/58new.png)
150-
151-
Siitä päästään eroon asentamalla [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) kehitysaikaiseksi riippuvuudeksi
152-
153-
```js
154-
npm install eslint-plugin-cypress --save-dev
155-
```
156-
157-
ja laajentamalla tiedostossa <i>.eslintrc.cjs</i> olevaa konfiguraatiota seuraavasti:
158-
159-
```js
160-
module.exports = {
161-
"env": {
162-
browser: true,
163-
es2020: true,
164-
"jest/globals": true,
165-
"cypress/globals": true // highlight-line
166-
},
167-
"extends": [
168-
// ...
169-
],
170-
"parserOptions": {
171-
// ...
172-
},
173-
"plugins": [
174-
"react", "jest", "cypress" // highlight-line
175-
],
176-
"rules": {
177-
// ...
178-
}
179-
}
180-
```
181-
182147
### Lomakkeelle kirjoittaminen
183148

184149
Laajennetaan testejä siten, että testi yrittää kirjautua sovellukseen. Oletetaan että backendin tietokantaan on tallennettu käyttäjä, jonka käyttäjätunnus on <i>mluukkai</i> ja salasana <i>salainen</i>.

0 commit comments

Comments
 (0)