Repository navigation
Commit abe5683
committed
test(extension): cover secret filtering and export retention, type the doubles
Three review comments on the settings surface measured true against f3fa813:
- ContextProxy.spec.ts "omits host-owned viewStates from a settings export" passed on an
empty export: the only positive check was toBeDefined(). It now sets customInstructions,
a portable global setting that globalSettingsExportSchema keeps, and asserts the exported
value, so a regression that drops settings fails. The viewStates rejection checks and the
claim-token escape check stay.
- api-configuration.spec.ts "omits host-owned viewStates from the settings the API returns"
had no secret in its fixture, so nothing covered the isSecretStateKey half of
getConfiguration(). The fixture now carries apiKey and the test asserts the full output with
toEqual plus a check that neither host-owned value escapes as a string.
- The same test's ClineProvider double carries a comment naming the members it provides, and
all four OutputChannel doubles come from makeOutputChannel(): vscode.OutputChannel with every
member per test-utils/provider.ts:9-13 instead of a double assertion.
Controls, both run against this tree and reverted before the commit: dropping
!isSecretStateKey(key) from getConfiguration() fails the api-configuration test (1 failed /
10 passed); making ContextProxy.export() parse an empty object fails the export test (1 failed
/ 64 passed); after `git checkout HEAD --` both files are green again (10/10 and 64/64).
Restore point f3fa813.
Test titles unchanged in both specs (6 and 75, same order): no case was reworded, skipped or
deleted. prettier --check, tsc --noEmit -p . and eslint --max-warnings=0 are clean, and the
scope measure still reports 494 extension / 8 types executable lines because specs do not count.1 parent f3fa813 commit abe5683
2 files changed
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
845 | 848 | | |
846 | 849 | | |
847 | 850 | | |
848 | | - | |
| 851 | + | |
849 | 852 | | |
850 | 853 | | |
851 | 854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
| |||
25 | 38 | | |
26 | 39 | | |
27 | 40 | | |
28 | | - | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| |||
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
62 | | - | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
| |||
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
86 | | - | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| |||
129 | 142 | | |
130 | 143 | | |
131 | 144 | | |
| 145 | + | |
| 146 | + | |
132 | 147 | | |
133 | 148 | | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
138 | 153 | | |
| 154 | + | |
| 155 | + | |
139 | 156 | | |
140 | 157 | | |
141 | 158 | | |
142 | | - | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
147 | | - | |
| 164 | + | |
| 165 | + | |
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
| 169 | + | |
151 | 170 | | |
| 171 | + | |
152 | 172 | | |
153 | 173 | | |
0 commit comments