TecKnow / muster-tools

A package for assigning players to tables at multi-table, walk-in gaming events.
GNU General Public License v3.0
0 stars 0 forks source link

Use NPM workspaces to dispatch tests #45

Open TecKnow opened 3 years ago

TecKnow commented 3 years ago

The top level 'muster-tools' package is an NPM workspace paackage. Right now it runs tests by invoking jest which inspects all the project's subdirectories. This means that the top level package must depend on Jest, and different version of Jest might get used depending on how the test command is issued.

Both of these problems can be aleviated by using the features of NPM workspaces to dispatch the command from the top package to the components.

TecKnow commented 3 years ago

This page has an example of this specific use case:

https://docs.npmjs.com/cli/v7/commands/npm-run-script#workspaces-support