Unit-test Javascript code with ava and sinon.
For example:
docker run --rm -v $(pwd)/example01/test:/app/code dcycle/ava:3
docker run --rm -v $(pwd)/example02/test:/app/code \
-v $(pwd)/example02/code:/mycode dcycle/ava:3
docker run --rm -v $(pwd)/example03/test:/app/code \
-v $(pwd)/example03/code:/mycode dcycle/ava:3
docker run --rm -v $(pwd)/example04/test:/app/code \
-v $(pwd)/example04/code:/mycode dcycle/ava:3
See this project on the Docker Hub.
Instead of
import test from 'ava'
import sinon from 'sinon'
Use:
const test = require('ava');
const sinon = require('sinon');