From 00f6de92651eed397edc35c68e51f91bbeb1264b Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Wed, 28 Jul 2021 10:49:09 +0200 Subject: [PATCH] README: add note about performance in Jest tests --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index be83ff2..b9095cc 100644 --- a/README.md +++ b/README.md @@ -457,6 +457,13 @@ messages per second on a laptop or 60 and 30 messages per second on a smartphone per CPU core (with Web Workers you can do these operations in parallel), which is good enough for most applications. +### Performance in Jest + +When using tweetnacl-js in tests with [Jest](jestjs.io), the +[extraGlobals](https://jestjs.io/docs/configuration#extraglobals-arraystring) +configuration variable should include `Math`. +This avoids a significant performance penalty from the test vm environment. + Contributors ------------