able-kangaroo-37061
07/20/2021, 2:21 PMthankful-lunch-80439
07/20/2021, 5:27 PMcypress/tests/api
tests
Are testing the APIs directly considered an end-to-end test?bulky-sundown-74498
07/20/2021, 5:29 PMthankful-lunch-80439
07/20/2021, 5:30 PMthankful-lunch-80439
07/20/2021, 5:30 PMthankful-lunch-80439
07/20/2021, 5:54 PMdescribe
and context
?thankful-lunch-80439
07/20/2021, 5:57 PMthankful-lunch-80439
07/20/2021, 5:58 PMable-kangaroo-37061
07/20/2021, 10:52 PMancient-wire-34126
07/22/2021, 12:18 PMa.ts
ts
let a = 0
export const addA = () => {
a++
}
export const getA = () => a
In my test file, I increase A:
ts
import { addA } from 'a'
before(() => {
addA()
})
In my setup file I have an interceptor:
ts
import { getA } from 'a'
cy.intercept({ method: 'POST', url: 'https://cognito-idp.us-east-1.amazonaws.com' }, (req) => {
console.log(getA())
})
But it always logs 0
?
This doesn't look like standard ES module behaviour, as you should be able to modify a value from a module through those functions.ancient-wire-34126
07/22/2021, 12:27 PMable-kangaroo-37061
07/22/2021, 9:57 PMplain-lifeguard-91120
07/23/2021, 6:23 PMancient-wire-34126
07/26/2021, 2:24 PMancient-wire-34126
07/26/2021, 2:26 PMancient-wire-34126
07/26/2021, 2:55 PMflat-electrician-52949
07/26/2021, 3:45 PMastonishing-whale-1406
07/26/2021, 3:47 PMbulky-sundown-74498
07/26/2021, 3:50 PMbulky-sundown-74498
07/26/2021, 3:50 PMflat-electrician-52949
07/26/2021, 3:52 PMbulky-sundown-74498
07/26/2021, 3:54 PMbulky-sundown-74498
07/26/2021, 3:55 PMastonishing-whale-1406
07/26/2021, 3:56 PMflat-electrician-52949
07/27/2021, 7:47 AMrough-nightfall-90576
07/29/2021, 5:41 PMbulky-sundown-74498
07/29/2021, 6:18 PMbulky-sundown-74498
07/29/2021, 6:18 PMuser
08/04/2021, 7:02 AMancient-wire-34126
08/04/2021, 1:54 PM