Connect to a Private npm Repository

Typically javascript/typescript based tests will include their dependencies in the package.json. If these libraries are hosted in publicly available repositories, Testery will just download them and install them prior to running your tests. But sometimes, you may want to have a privately hosted module (e.g. one that contains wrappers for your business objects).

To connect to a private npm repository, you will want to include the connection info in an .npmrc file or simply by adding your npm token as an environment variable.

Click Environments -> Add New Environment (or edit existing).

Under Files click Add File. Call the file npmrc and add the following content,


The contents of this file will be encrypted on Testery.

When you run tests, the npmrc file will be created prior to running npm install and give the test runner access to your private npm repository.

Last updated