Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 1.26 KB

scratch.md

File metadata and controls

18 lines (11 loc) · 1.26 KB

Configuration - From Scratch

First, unless you are using shims, moka requires that your local paths match your repo names. If your projects directory is /devroot then module foo should be at /devroot/foo/ and @bar/baz must be at /devroot/@bar/baz. If you are using multiple instances of projects, you'll need to set up a symlinking scheme yourself.

You'll also need a dependency a couple of dependencies:

npm install --save-dev @environment-safe/runtime-context
npm install --save-dev browser-or-node

Before using moka you need to add it's configuration to your package.json you need to define a set of targets as well as any packages you will be stubbing ( substituting a dummy module for, because it isn't actually in the executed browser code path) and shimming (providing an explicit location for a given package). moka's own package.json is a good example of how this might look, because the package tests itself.

In addition all tests must have a unique name

the easiest path is to set up a simple .moka entry then test interactively for problematic dependencies. My hope is that the need for stubs and shims subsides over time.