Commit 342ec9e
committed
Two comments in `parse-cel-to-ast.test.ts` described `classifyError`'s
pre-#6202 behaviour as if it were current:
- `:139-143` told the next reader that `((record.a)` is graded `runtime`
because cel-js's `Expected RPAREN, got EOF` misses `classifyError`'s
/parse|unexpected|syntax/i, and instructed them that asserting the
correct verdict "would enshrine it".
- `:116-118` gave "`classifyError` reads the phrasing" as the live reason
for a test-design decision.
Neither holds. PR #6202 (#6133) made the ParseError arm structural and
PR #6677 (#6223) deleted the keyword table; the regex quoted in the first
comment had no remaining occurrence in the package except that comment.
Measured on this branch rather than taken from the changelog:
"((record.a)" -> kind=parse | Expected RPAREN, got EOF
"record.budget >" -> kind=parse | Unexpected token: EOF
"record.a $$ 1" -> kind=parse | Unexpected character: $
"record.a ?? 3" -> kind=parse | Unexpected token: QUESTION
The message wording is unchanged; only the grading moved. The comments
are rewritten to that measurement, and `((record.a)` is promoted from
"deliberately not asserted" to an ordinary assertion alongside
`record.budget >`, since the verdict it was withheld over is now stable.
No assertion in the file encoded the old grading, so nothing behavioural
was pinned wrong; the omission was the only stale artefact besides prose.
1 parent 55da611 commit 342ec9e
1 file changed
Lines changed: 23 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
| |||
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
135 | | - | |
136 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
137 | 156 | | |
138 | 157 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 158 | | |
145 | 159 | | |
146 | 160 | | |
| |||
0 commit comments