This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): disable preload when NODE_ENV is 'test'
Preload tests failed in browser because preload is enabled in browser context by default and while js-ipfs tests disable preload in tests, interface-ipfs-core does not. This means interface-ipfs-core tests triggered dozens of slow/hanging requests to `nodeX.preload.iofs.io/api/v0/refs` and js-ipfs executed only 4 at a time. By the time preload tests got executed, the queue was long and it did not finish before timeout. This change detects js-ipfs is running in test environment (`process.env.NODE_ENV === 'test'`) and disables preload by default. This way we are still be able to test preload by explicitly enabling it in config, but we won't have preload overhead when running unrelated interface-ipfs-core tests. License: MIT Signed-off-by: Marcin Rataj <lidel@lidel.org>
- Loading branch information