Has anybody successfully set up SuperTokens for E2E testing with a Nest.js backend? I can't for the life of me get supertokens to initialize properly, or at all. I've followed the integration docs for Nest.js, and have set up a
SupertokensService
with a constructor that calls
supertokens.init({ ... config ... })
. This setup works great in both development and production. Among other things, we use
Session.getSession
during request processing. But for any request I send during an E2E test, I get an
Initialisation not done. Did you forget to call the SuperTokens.init function?
error. Also, the
/auth/signin
routes are not available.
I've resorted to logging:
console.log('pre-init')
supertokens.init( ... )
console.log('post-init')
and sure enough, I can see my custom init logs, but still supertokens remains uninitialized. I've set
DEBUG=com.supertokens
, but this gives me nothing in the E2E test.