I have a question about the if a variable value persist between different calls.
I have a file called shared.ts which contains a variable isSignIn and a function signIn like below:
let isSignIn = false
export function signIn() {
if (isSignIn) {
// do nothing
} else {
// do actual sign in
}
}
This signIn function is called by other files. During tests, it seems the value of isSignIn persist between different calls. I would like to know why.