When setting up schematics in a library you end up with a structure like so:
library
-schematics
--update
---index.spec.ts
-src
--test.ts
How would I setup the index.spec.ts
to run with the library tests when the nested test.ts
searches for tests at or below itself:
const context = require.context('./', true, /\.spec\.ts$/);
and looking up a folder crashes.
Unfortunately, the sparse schematics documentation skips testing (among virtually everything else that might be useful). https://angular.io/guide/schematics-for-libraries