Skip to content

Commit a7f053e

Browse files
authored
Merge pull request #2502 from eemanioui/config-correction
updated lesson content to match branch content
2 parents 9ff9dc7 + 3153586 commit a7f053e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/content/5/en/part5d.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -902,8 +902,10 @@ module.exports = defineConfig({
902902
setupNodeEvents(on, config) {
903903
},
904904
baseUrl: 'http://localhost:3000',
905-
BACKEND: 'http://localhost:3001/api' // highlight-line
906905
},
906+
env: {
907+
BACKEND: 'http://localhost:3001/api' // highlight-line
908+
}
907909
})
908910
```
909911
@@ -912,14 +914,15 @@ Let's replace all the backend addresses from the tests in the following way
912914
```js
913915
describe('Note ', function() {
914916
beforeEach(function() {
915-
cy.visit('')
916-
cy.request('POST', `${Cypress.env('EXTERNAL_API')}/testing/reset`) // highlight-line
917+
918+
cy.request('POST', `${Cypress.env('BACKEND')}/testing/reset`) // highlight-line
917919
const user = {
918920
name: 'Matti Luukkainen',
919921
username: 'mluukkai',
920922
password: 'secret'
921923
}
922-
cy.request('POST', `${Cypress.env('EXTERNAL_API')}/users`, user) // highlight-line
924+
cy.request('POST', `${Cypress.env('BACKEND')}/users`, user) // highlight-line
925+
cy.visit('')
923926
})
924927
// ...
925928
})

0 commit comments

Comments
 (0)