Posts

Nodejs - Memory Intensive Promise Operations

Backpressure for Promises

When dealing with promises, the processing of long-running tasks is the commonly encountered scenario. However, some long-running task might also be performing memory intensive operations. To deal with running multiple operations at once, it is important to place a limit on the number of promises allowed to run at the same time as to not exhaust the Nodejs JavaScript heap.

Tags: #NodeJs
Snowpack - Running Tests with @web/test-runner

Set up @web/test-runner

Snowpack recommends that @web/test-runner be used as the test runner of choice. Using this setup will allow you to conveniently run tests that would run in the browser after the Snowpack dev server has started.

First, install the dependencies found in the "devDependencies" in package.json with

npm install @esm-bundle/chai @snowpack/web-test-runner-plugin @web/test-runner
Categories: #shell #JavaScript
Tags: #NodeJs