this important file, for example:
https://github.com/hex13/lupa/blob/master/src/analysis.js
here is API which outer applications use to communicate with Lupa as a library. File is called analysis.js but it containts more of a "controller" or "orchestrator" for whole thing.
We must test if module analysis.js:
calls correct plugins based on config and on files itself (e.g. file extensions)
triggers event callbacks after analysis
returns correct data (some sort of integration test. Exact data correctness is tested in tests for plugins, but even if some plugin correctly performs analysis, this doesn't mean that library returns correct data as a whole when called by external application).
modules which perform actual analysis (utils for AST and plugin which analyses JavaScript) are tested https://github.com/hex13/lupa/tree/master/plugins/test
but there are still no tests for
analysis.js
but it containts more of a "controller" or "orchestrator" for whole thing.We must test if module
analysis.js
: