Skip to content

runtests.ts should just wrap an object #2

Description

@matthews314

The runtests.ts script is the actual access point to the testing framework for the users. By running runtests.js (the transpiled counterpart), we effectively tell the framework to inspect our project, find tests, import them and run them.

runtests.ts will grow larger, since we'll need to make it read a configuration file, add more console options... in order to allow the user to decide whether to print the results on the console or redirect the output somewhere else (e.g. XML files), to customize the way results are displayed and so on.

This means that almost all the code in runtests.ts has to be moved into a class, to allow easy dependency injection therefore enabling testing. Then, runtests.ts will only need to construct the objects its needs in order to do its thing and pass them the process.args.

Since this will become increasingly difficult while the codebase grows, the sooner I do it, the better. Also, this is the only significant portion of untested code by now, so code quality will highly benefit from solving this issue.

Since this won't change the behavior of the framework, this will just cause the patch version number to increase.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions