Symptom
When a spec file under tests/specs/ either:
- has
it() calls at the top of run() without a describe() wrapper, OR
- errors on load (e.g., the spec references
application.wo.X from a global include that doesn't exist yet)
…the test runner reports nothing about it. The summary line shows:
(for case 1, when running only the malformed spec via --spec=path/to/X)
or:
48 passed, 0 failed, -1 error(s) (9.13s)
(for case 2, when running alongside passing specs — note the -1 error count).
No filename, no error message, no indication that a spec file failed to load.
Reproduction
Case 1 — it() at top of run(), no describe()
component extends="wheels.WheelsTest" {
function run() {
it("does a thing", () => {
expect(true).toBeTrue();
});
}
}
Running wheels test --spec=path/to/that/file reports 0 passed. Wrapping the it() in describe("X", () => { ... }) makes it run normally. The runner gives no hint that the bare it() form is invalid.
Case 2 — Spec errors during load
component extends="wheels.WheelsTest" {
function beforeAll() {
variables.helper = application.wo.functionDoesNotExist;
}
function run() {
describe("foo", () => {
it("does a thing", () => {
expect(true).toBeTrue();
});
});
}
}
If the spec file throws during load (here application.wo.functionDoesNotExist is undefined), the runner reports -1 error(s) in the summary count rather than printing the actual exception and the offending file name.
Why it matters
Both shapes are easy to land accidentally during iteration (especially the application.wo.X case during TDD when you're writing the spec before the helper). The silent failure costs minutes of "wait, why isn't my new test running?" debugging per occurrence, and the -1 error(s) count is itself a clue that something is wrong but unhelpful as a starting point for diagnosis.
Suggestion
For case 1: at minimum, log a warning when a spec file's run() contains it() calls that didn't end up registered. Ideally, register them under an auto-generated top-level describe (e.g. <filename>) so they DO run, since that's likely what the author intended.
For case 2: when a spec file throws during load, print the file path + the exception message + a short stack frame, and count it as an error (positive, with file context) rather than a -1.
Discovered during
Phase 1 of an internal RBAC portal build on Wheels 4.0.2 / Lucee 7 — full context in https://github.com/paiindustries/titan/pull/3337 (private, but happy to extract specific snippets if useful).
Symptom
When a spec file under
tests/specs/either:it()calls at the top ofrun()without adescribe()wrapper, ORapplication.wo.Xfrom a global include that doesn't exist yet)…the test runner reports nothing about it. The summary line shows:
(for case 1, when running only the malformed spec via
--spec=path/to/X)or:
(for case 2, when running alongside passing specs — note the
-1error count).No filename, no error message, no indication that a spec file failed to load.
Reproduction
Case 1 —
it()at top ofrun(), nodescribe()component extends="wheels.WheelsTest" { function run() { it("does a thing", () => { expect(true).toBeTrue(); }); } }Running
wheels test --spec=path/to/that/filereports0 passed. Wrapping theit()indescribe("X", () => { ... })makes it run normally. The runner gives no hint that the bareit()form is invalid.Case 2 — Spec errors during load
component extends="wheels.WheelsTest" { function beforeAll() { variables.helper = application.wo.functionDoesNotExist; } function run() { describe("foo", () => { it("does a thing", () => { expect(true).toBeTrue(); }); }); } }If the spec file throws during load (here
application.wo.functionDoesNotExistis undefined), the runner reports-1 error(s)in the summary count rather than printing the actual exception and the offending file name.Why it matters
Both shapes are easy to land accidentally during iteration (especially the
application.wo.Xcase during TDD when you're writing the spec before the helper). The silent failure costs minutes of "wait, why isn't my new test running?" debugging per occurrence, and the-1 error(s)count is itself a clue that something is wrong but unhelpful as a starting point for diagnosis.Suggestion
For case 1: at minimum, log a warning when a spec file's
run()containsit()calls that didn't end up registered. Ideally, register them under an auto-generated top-level describe (e.g.<filename>) so they DO run, since that's likely what the author intended.For case 2: when a spec file throws during load, print the file path + the exception message + a short stack frame, and count it as an
error(positive, with file context) rather than a-1.Discovered during
Phase 1 of an internal RBAC portal build on Wheels 4.0.2 / Lucee 7 — full context in https://github.com/paiindustries/titan/pull/3337 (private, but happy to extract specific snippets if useful).