bzlgen icon indicating copy to clipboard operation
bzlgen copied to clipboard

Add the ability to generate test targets

Open JesseTatasciore opened this issue 5 years ago • 4 comments

When there are test files present, it would be useful to generate the targets necessary to run those tests

JesseTatasciore avatar Jan 23 '20 20:01 JesseTatasciore

Does the functionality exist in our previous version of gen internally? I think it generated the ts_web_test and ng_web_test macros.

Do we still want that here or should it gen a ts_library and thekarma_web_test_suite?

mattem avatar Jan 23 '20 23:01 mattem

Yes our previous internal version generated for the macros. I would be inclined to say macro. Allows for mass customization of targets / what if someone wants an additional target for whatever reason. Leaves the implementation out of our hands

JesseTatasciore avatar Jan 24 '20 13:01 JesseTatasciore

Seems reasonable, we should look to add ng_web_test and ts_web_test to the index.bzl here. I quite like those as macros anyway.

mattem avatar Jan 24 '20 19:01 mattem

So for our repository we use jasmine_node_test for all our unit testing, this includes both nodejs and browser targets.

Might be worth making it configurable?

Toxicable avatar Jan 31 '20 21:01 Toxicable