A collection of git modules and fossa config scenarios to test fossa-cli
against.
Requires to be run on a host machine with fossa-cli
and NodeJS
installed.
- Install latest
fossa-cli
. - Run
npm install
oryarn
yarn run test
CommonJS Packages
- Recast (yarn, lots of dev dependencies)
- Optimistic (vanilla npm / package.json, no lockfile)
To add test cases, fork an attractive repo into the FOSSA org (to pin version) and then add them with git submodule add https://github.com/fossas/{REPONAME}
.
You can create test cases under test/{TEST_FILE}.js
with any configuration dependencies under /config/{TEST_CONFIG).yml
.
The idiomatic test's bootstrap logic should be:
- Invalidate existing builds (i.e. delete any
node_modules
directory in a submodule) - Run FOSSA in "output" mode with the
--install
flag pointed at test config, i.e. (fossa -o --config ./config/{TEST_CONFIG}.yml --install
) - Parse stdout and write test logic around it