Commit 26ee4eb
committed
refactor: improve resource dependency injection pattern
- Remove setTestExecutor/clearTestExecutor pattern from resources.ts
- Update resource handler to use standard default parameter pattern
- Simplify resource tests to match other test patterns in codebase
- Add documentation about dependency injection pattern in TESTING.md
- Ensure all handlers (tools, resources, future types) follow same DI pattern
This aligns resource implementation with established project patterns.1 parent 51060fc commit 26ee4eb
3 files changed
Lines changed: 15 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
| |||
118 | 113 | | |
119 | 114 | | |
120 | 115 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 116 | + | |
124 | 117 | | |
125 | 118 | | |
126 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
| |||
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 36 | | |
58 | 37 | | |
59 | 38 | | |
| 39 | + | |
60 | 40 | | |
61 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
62 | 44 | | |
63 | 45 | | |
64 | 46 | | |
65 | 47 | | |
66 | 48 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 49 | + | |
70 | 50 | | |
71 | 51 | | |
72 | 52 | | |
| |||
102 | 82 | | |
103 | 83 | | |
104 | 84 | | |
105 | | - | |
106 | | - | |
| 85 | + | |
107 | 86 | | |
108 | 87 | | |
109 | 88 | | |
110 | 89 | | |
111 | | - | |
| 90 | + | |
112 | 91 | | |
113 | 92 | | |
114 | 93 | | |
| |||
0 commit comments