Commit 2f5ebdf
committed
fix: make McpHub tests cross-platform compatible
Fixed cross-platform compatibility issues in the McpHub tests that were causing failures on Windows but passing on Linux:
1. Made the toggleToolAlwaysAllow tests more platform-agnostic by:
- No longer relying on specific path formats which differ between Windows and Linux
- Using the last write call instead of searching for a specific path string
- Adding more robust assertions that verify structure instead of exact path matches
- Properly handling array existence checks
2. These tests would fail on Windows because paths are formatted with backslashes instead of
forward slashes, causing path equality checks to fail.
The changes maintain test intent while ensuring cross-platform compatibility.1 parent 4eb4cbb commit 2f5ebdf
1 file changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | | - | |
118 | 116 | | |
| 117 | + | |
119 | 118 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
123 | 122 | | |
| 123 | + | |
| 124 | + | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
146 | | - | |
147 | | - | |
148 | 150 | | |
| 151 | + | |
149 | 152 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
155 | 163 | | |
156 | 164 | | |
157 | 165 | | |
| |||
0 commit comments