Commit e84fabe
committed
test: align interceptor unit tests with FIX-BATCH-3 changes
Four unit tests asserted against pre-FIX-BATCH-3 behavior. Bringing them
in line with the shipped code:
1. logs/__tests__/interceptor.test.ts — error message no longer mentions
the internal field name `interceptorFunctionName`. Assert against the
new "has no Lambda function" copy that the user actually sees.
2. shared/__tests__/interceptor-mode-check.test.ts — error message no
longer leaks `deployed-state.json`. Assert against the new
"is not deployed" copy.
3. schema/.../interceptor.test.ts — schema fields are .optional() and
defaults are applied at consumption time (not parse time), so a
sparse parse leaves them undefined rather than filling them in.
4. operations/deploy/__tests__/preflight.test.ts — the new
validateGatewayTargetLambdas() preflight imports getCredentialProvider
from aws/account.js. Stub it in the existing vi.mock so existing
fixtures (which have no lambda-function-arn targets) keep working.1 parent 5c49d54 commit e84fabe
4 files changed
Lines changed: 14 additions & 7 deletions
File tree
- src
- cli
- commands
- logs/__tests__
- operations/deploy/__tests__
- schema/schemas/primitives/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
0 commit comments