mardi 8 novembre 2016

Jest secure cookies?

My Jest tests are setup to mock my backend response when run on CI, but an environment variable allows them to run against the real backend locally.

The problem is that we've now switched auth to use secure, http-only cookies. Is it possible to cause Jest to configure jsdom to respect cookies?

I think jsdom's cookieJar config might do the trick, but can't figure out how to configure that via jest.

Aucun commentaire:

Enregistrer un commentaire