Add a standard test with new projects
There's a simple test that could always be included with every project, simply checking if every file mentioned in the provides
key can actually be included using use
. There's a use-ok
subroutine available in the Test
module that can be used for this. The following test code should do the trick:
use JSON::Fast;
use Test;
"META6.json".IO.slurp.&from-json<provides>.grep(*.value.starts-with("lib")).Hash.keys.map({ use-ok $_, "$_ can be used" });
done-testing;
This would mean that any new project will have to depend on JSON::Fast
for testing, but this can be added in the default META6.json
, generated by assixt, as well.