bazelbuild / bazelbuild/rules_closure

Consider making closure_js_test "_test" file suffix configurable

Open
#209 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
159
Forks
111
PR merge metrics
No merged PRs in 30d

Description

closure_js_test is checking that the files in `srcs` end with `_test.js`:
https://github.com/bazelbuild/rules_closure/blob/master/closure/testing/closure_js_test.bzl#L40

Nowadays angular is recommending a naming structure where test files end with `.spec.js`:
https://angular.io/docs/ts/latest/guide/style-guide.html#!#02-10

Besides forcing a naming consistency across the app and the test files (which is a really good thing), is there any other reason to prescribe that test files must end in `_test.js`?

Would it make sense to make the suffix configurable or more flexible?

Contributor guide

Open the contributing guide

Research direction

Start with closure/testing/closure_js_test.bzl around line 40, where closure_js_test checks that srcs end in _test.js. Review the surrounding rule behavior and any related tests, then define how a configurable or flexible suffix should work while preserving the existing convention as the default.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.