@flowbuild/test-core
v1.2.0
Published
Core library with testing functionalities for flowbuild
Downloads
8
Readme
test-core
Core library with testing functionalities for flowbuild
Installation
npm install @flowbuild/test-core
Usage (getAllPaths)
You can use this plugin to get the paths ignoring or not the present loops, as follows.
// ignoring loops - add 'true' as the second argument of function 'getAllPaths'
const { getAllPaths } = require('@flowbuild/test-core');
const allPaths = getAllPaths(blueprint, true);
// counting paths with loops - just pass the first argument (false is the default
// for the second argument)
const { getAllPaths } = require('@flowbuild/test-core');
const allPaths = getAllPaths(blueprint);
/*
note that 'blueprint' must be a valid blueprint inside flowbuild's pattern, i.e,
must have the valid properties 'name', 'description' and 'blueprint_spec' in it.
*/
Usage (getLoops)
You can use this plugin to get all loops present in a blueprint.
const { getLoops } = require('@flowbuild/test-core');
const allLoops = getLoops(blueprint);
/*
note that 'blueprint' must be a valid blueprint inside flowbuild's pattern, i.e,
must have the valid properties 'name', 'description' and 'blueprint_spec' in it.
*/