Yeah, that’s odd, but glad you fixed it.
I have a file with all the fixtures in it and I just import it before each group of tests.
Cypress.Commands.add("resetDb", () => {
const mongoport = 3001;
cy.exec(
`mongorestore --host localhost:${mongoport} --drop --gzip --archive=./tests/testFixtures.agz`
);
});
And I don’t recommend running in test mode as that requires specifying the test driver etc. We just run it in development mode but use our own environment settings to see it’s in testing mode.
By importing the db you’ll have effectively destroyed that user, so no need to explicitly destroy it.