Closed rorticus closed 5 years ago
Looking to get some discussion on this, but I think we might want to add a parameter or something that would generate the tests/unit/all.ts
file. Maybe something like dojo test --discover
or something. While we don't even really need an all.ts
file for testing via node, the dojo build -m tests
command expects actual files in the tests/unit directory so if we want to work with the existing build stuff, we'll probably want to actually generate the all.ts file and maybe add it to .gitignore?
So.. added spec.ts globs to cli-build-app and cli-build-widget. That means that the only discovery we need to do here is when running via node we can use a glob. No need to actually create files.
Enhancement
In order to move towards a "zero-configuration" usage of cli-test-intern, we should support an option to automatically discover all of the ".spec.ts" and ".spec.tsx" files and dynamically generate (or append to) an "all.ts" file expected by cli-test-intern. We want to include these files in a single suite, rather than use interns builtin glob support, because while the glob would work fine from node, in the browser we cannot search for files like that.
Basically we need a more clever implementation of:
This is needed to help us resolve https://github.com/dojo/widgets/issues/787.