principles-disciple 1.62.0 → 1.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,678 +0,0 @@
1
- /**
2
- * Edit Verification Module Tests
3
- *
4
- * Testing extracted edit verification functions:
5
- * - normalizeLine()
6
- * - findFuzzyMatch()
7
- * - tryFuzzyMatch()
8
- * - generateEditError()
9
- * - handleEditVerification()
10
- */
11
-
12
- import { describe, it, expect, vi, beforeEach } from 'vitest';
13
- import {
14
- normalizeLine,
15
- findFuzzyMatch,
16
- tryFuzzyMatch,
17
- generateEditError,
18
- handleEditVerification
19
- } from '../../src/hooks/edit-verification.js';
20
- import { WorkspaceContext } from '../../src/core/workspace-context.js';
21
- import * as fs from 'fs';
22
- import * as path from 'path';
23
-
24
- vi.mock('fs');
25
- vi.mock('../../src/core/workspace-context.js');
26
-
27
- describe('edit-verification - normalizeLine', () => {
28
- it('should collapse multiple spaces into single space', () => {
29
- const result = normalizeLine('const x = 1;');
30
- expect(result).toBe('const x = 1;');
31
- });
32
-
33
- it('should collapse tabs into spaces', () => {
34
- const result = normalizeLine('\tconst\tx\t=\t1;');
35
- expect(result).toBe('const x = 1;');
36
- });
37
-
38
- it('should trim leading/trailing whitespace', () => {
39
- const result = normalizeLine(' const x = 1; ');
40
- expect(result).toBe('const x = 1;');
41
- });
42
-
43
- it('should handle mixed tabs and spaces', () => {
44
- const result = normalizeLine(' \t const \t x \t = \t 1; \t ');
45
- expect(result).toBe('const x = 1;');
46
- });
47
-
48
- it('should handle empty string', () => {
49
- const result = normalizeLine('');
50
- expect(result).toBe('');
51
- });
52
-
53
- it('should handle whitespace-only string', () => {
54
- const result = normalizeLine(' \t ');
55
- expect(result).toBe('');
56
- });
57
- });
58
-
59
- describe('edit-verification - findFuzzyMatch', () => {
60
- it('should return -1 for empty oldLines', () => {
61
- const lines = ['const x = 1;', 'const y = 2;'];
62
- const oldLines: string[] = [];
63
- const result = findFuzzyMatch(lines, oldLines, 0.8);
64
- expect(result).toBe(-1);
65
- });
66
-
67
- it('should find exact match at position 0', () => {
68
- const lines = ['const x = 1;', 'const y = 2;', 'const z = 3;'];
69
- const oldLines = ['const x = 1;', 'const y = 2;'];
70
- const result = findFuzzyMatch(lines, oldLines, 0.8);
71
- expect(result).toBe(0);
72
- });
73
-
74
- it('should find exact match at later position', () => {
75
- const lines = ['const a = 1;', 'const x = 1;', 'const y = 2;'];
76
- const oldLines = ['const x = 1;', 'const y = 2;'];
77
- const result = findFuzzyMatch(lines, oldLines, 0.8);
78
- expect(result).toBe(1);
79
- });
80
-
81
- it('should match with different whitespace (fuzzy)', () => {
82
- const lines = ['const x = 1;', 'const y = 2;'];
83
- const oldLines = ['const x = 1;', 'const y = 2;'];
84
- const result = findFuzzyMatch(lines, oldLines, 0.8);
85
- expect(result).toBe(0);
86
- });
87
-
88
- it('should respect threshold (0.8)', () => {
89
- const lines = ['const x = 1;', 'WRONG LINE', 'const y = 2;'];
90
- const oldLines = ['const x = 1;', 'const y = 2;'];
91
- const result = findFuzzyMatch(lines, oldLines, 0.8);
92
- // 1/2 = 50% < 80%, should not match
93
- expect(result).toBe(-1);
94
- });
95
-
96
- it('should use custom threshold (0.6)', () => {
97
- const lines = ['const x = 1;', 'WRONG LINE', 'const y = 2;'];
98
- const oldLines = ['const x = 1;', 'const y = 2;'];
99
- const result = findFuzzyMatch(lines, oldLines, 0.6);
100
- // 1/2 = 50% < 60%, should not match
101
- expect(result).toBe(-1);
102
- });
103
-
104
- it('should match when 2/3 lines match with 0.6 threshold', () => {
105
- const lines = ['const x = 1;', 'const y = 2;', 'const z = 3;'];
106
- const oldLines = ['const x = 1;', 'const y = 2;'];
107
- const result = findFuzzyMatch(lines, oldLines, 0.6);
108
- // 2/2 = 100% > 60%, should match
109
- expect(result).toBe(0);
110
- });
111
-
112
- it('should return -1 when no match found', () => {
113
- const lines = ['const a = 1;', 'const b = 2;', 'const c = 3;'];
114
- const oldLines = ['const x = 1;', 'const y = 2;'];
115
- const result = findFuzzyMatch(lines, oldLines, 0.8);
116
- expect(result).toBe(-1);
117
- });
118
- });
119
-
120
- describe('edit-verification - tryFuzzyMatch', () => {
121
- it('should return found: false when no match', () => {
122
- const currentContent = 'const a = 1;\nconst b = 2;';
123
- const oldText = 'const x = 1;';
124
- const result = tryFuzzyMatch(currentContent, oldText, 0.8);
125
- expect(result).toEqual({ found: false });
126
- });
127
-
128
- it('should return found: true with correctedText when match found', () => {
129
- const currentContent = 'const x = 1;';
130
- const oldText = 'const x = 1;';
131
- const result = tryFuzzyMatch(currentContent, oldText, 0.8);
132
- expect(result.found).toBe(true);
133
- expect(result.correctedText).toBe('const x = 1;');
134
- });
135
-
136
- it('should extract actual text with extra spaces', () => {
137
- const currentContent = 'const x = 1;';
138
- const oldText = 'const x = 1;';
139
- const result = tryFuzzyMatch(currentContent, oldText, 0.8);
140
- expect(result.found).toBe(true);
141
- expect(result.correctedText).toBe('const x = 1;');
142
- });
143
-
144
- it('should extract multi-line match with different whitespace', () => {
145
- const currentContent = 'const x = 1;\nconst y = 2;';
146
- const oldText = 'const x = 1;\nconst y = 2;';
147
- const result = tryFuzzyMatch(currentContent, oldText, 0.8);
148
- expect(result.found).toBe(true);
149
- expect(result.correctedText).toBe('const x = 1;\nconst y = 2;');
150
- });
151
- });
152
-
153
- describe('edit-verification - generateEditError', () => {
154
- it('should generate error message with file path', () => {
155
- const oldText = 'const x = 1;';
156
- const currentContent = 'const y = 2;';
157
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
158
- expect(result).toContain('File: /path/to/file.ts');
159
- expect(result).toContain('[P-03 Violation]');
160
- });
161
-
162
- it('should include expected text snippet', () => {
163
- const oldText = 'const x = 1;';
164
- const currentContent = 'different content';
165
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
166
- expect(result).toContain('Expected to find:');
167
- expect(result).toContain('const x = 1;');
168
- });
169
-
170
- it('should include actual text snippet', () => {
171
- const oldText = 'const x = 1;';
172
- const currentContent = 'different content here';
173
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
174
- expect(result).toContain('Actual file contains:');
175
- expect(result).toContain('different content here');
176
- });
177
-
178
- it('should truncate long oldText to 200 characters', () => {
179
- const longText = 'a'.repeat(300);
180
- const currentContent = 'b'.repeat(300);
181
- const result = generateEditError('/path/to/file.ts', longText, currentContent);
182
- // Should have 200 'a's plus '...'
183
- expect(result).toContain('a'.repeat(200));
184
- expect(result).toContain('...');
185
- });
186
-
187
- it('should truncate long currentContent to 200 characters', () => {
188
- const oldText = 'a'.repeat(300);
189
- const currentContent = 'b'.repeat(300);
190
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
191
- // Should have 200 'b's plus '...'
192
- expect(result).toContain('b'.repeat(200));
193
- expect(result).toContain('...');
194
- });
195
-
196
- it('should include possible reasons', () => {
197
- const oldText = 'const x = 1;';
198
- const currentContent = 'const y = 2;';
199
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
200
- expect(result).toContain('Possible reasons:');
201
- expect(result).toContain('- File has been modified by another process');
202
- expect(result).toContain('- Whitespace characters do not match');
203
- expect(result).toContain('- Context compression caused outdated information');
204
- });
205
-
206
- it('should include solution steps', () => {
207
- const oldText = 'const x = 1;';
208
- const currentContent = 'const y = 2;';
209
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
210
- expect(result).toContain('Solution:');
211
- expect(result).toContain("1. Use 'read' tool to get current file content");
212
- expect(result).toContain('2. Update your edit command with exact text from file');
213
- expect(result).toContain('3. Retry edit operation');
214
- });
215
-
216
- it('should mention P-03 principle', () => {
217
- const oldText = 'const x = 1;';
218
- const currentContent = 'const y = 2;';
219
- const result = generateEditError('/path/to/file.ts', oldText, currentContent);
220
- expect(result).toContain('P-03');
221
- expect(result).toContain('精确匹配前验证原则');
222
- });
223
- });
224
-
225
- describe('edit-verification - handleEditVerification', () => {
226
- const mockEvent = {
227
- toolName: 'edit',
228
- params: {
229
- file_path: 'src/example.ts',
230
- oldText: 'const x = 1;',
231
- newText: 'const x = 2;',
232
- },
233
- };
234
-
235
- const mockWctx = {
236
- resolve: vi.fn().mockImplementation((p) => `/mock/workspace/${p}`),
237
- };
238
-
239
- const mockLogger = {
240
- info: vi.fn(),
241
- warn: vi.fn(),
242
- error: vi.fn(),
243
- };
244
-
245
- beforeEach(() => {
246
- vi.clearAllMocks();
247
- });
248
-
249
- describe('exact match scenarios', () => {
250
- it('should allow edit when oldText matches exactly', () => {
251
- const fileContent = 'const x = 1;';
252
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
253
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
254
-
255
- const result = handleEditVerification(
256
- mockEvent as any,
257
- mockWctx as any,
258
- { logger: mockLogger },
259
- { enabled: true }
260
- );
261
-
262
- expect(result).toBeUndefined();
263
- expect(mockLogger.info).toHaveBeenCalledWith(
264
- expect.stringContaining('Verified edit')
265
- );
266
- });
267
-
268
- it('should skip verification when enabled = false', () => {
269
- const result = handleEditVerification(
270
- mockEvent as any,
271
- mockWctx as any,
272
- { logger: mockLogger },
273
- { enabled: false }
274
- );
275
-
276
- expect(result).toBeUndefined();
277
- expect(mockLogger.info).not.toHaveBeenCalled();
278
- });
279
- });
280
-
281
- describe('missing parameters', () => {
282
- it('should allow edit when file_path is missing', () => {
283
- const event = {
284
- ...mockEvent,
285
- params: {
286
- oldText: 'const x = 1;',
287
- newText: 'const x = 2;',
288
- },
289
- };
290
-
291
- const result = handleEditVerification(
292
- event as any,
293
- mockWctx as any,
294
- { logger: mockLogger },
295
- { enabled: true }
296
- );
297
-
298
- expect(result).toBeUndefined();
299
- });
300
-
301
- it('should allow edit when oldText is missing', () => {
302
- const event = {
303
- ...mockEvent,
304
- params: {
305
- file_path: 'src/example.ts',
306
- newText: 'const x = 2;',
307
- },
308
- };
309
-
310
- const result = handleEditVerification(
311
- event as any,
312
- mockWctx as any,
313
- { logger: mockLogger },
314
- { enabled: true }
315
- );
316
-
317
- expect(result).toBeUndefined();
318
- });
319
- });
320
-
321
- describe('binary file handling', () => {
322
- const binaryExtensions = [
323
- '.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp', '.svg',
324
- '.pdf', '.zip', '.tar', '.gz', '.7z', '.rar',
325
- '.exe', '.dll', '.so', '.dylib', '.bin',
326
- '.mp3', '.mp4', '.avi', '.mov', '.wav',
327
- '.ttf', '.otf', '.woff', '.woff2',
328
- '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx'
329
- ];
330
-
331
- binaryExtensions.forEach(ext => {
332
- it(`should skip verification for ${ext} files`, () => {
333
- const event = {
334
- ...mockEvent,
335
- params: {
336
- ...mockEvent.params,
337
- file_path: `image${ext}`,
338
- },
339
- };
340
-
341
- const result = handleEditVerification(
342
- event as any,
343
- mockWctx as any,
344
- { logger: mockLogger },
345
- { enabled: true }
346
- );
347
-
348
- expect(result).toBeUndefined();
349
- expect(mockLogger.info).toHaveBeenCalledWith(
350
- expect.stringContaining('Skipping verification for binary file')
351
- );
352
- });
353
- });
354
- });
355
-
356
- describe('file size check', () => {
357
- it('should block files exceeding max_file_size_bytes when skip_large_file_action = block', () => {
358
- const largeFileSize = 11 * 1024 * 1024; // 11MB
359
-
360
- vi.mocked(fs.statSync).mockReturnValue({ size: largeFileSize } as fs.Stats);
361
-
362
- const result = handleEditVerification(
363
- mockEvent as any,
364
- mockWctx as any,
365
- { logger: mockLogger },
366
- {
367
- enabled: true,
368
- max_file_size_bytes: 10 * 1024 * 1024,
369
- skip_large_file_action: 'block',
370
- }
371
- );
372
-
373
- expect(result?.block).toBe(true);
374
- expect(result?.blockReason).toContain('File is too large');
375
- expect(mockLogger.warn).toHaveBeenCalledWith(
376
- expect.stringContaining('BLOCKED')
377
- );
378
- });
379
-
380
- it('should skip verification (warn) for files exceeding max_file_size_bytes by default', () => {
381
- const largeFileSize = 11 * 1024 * 1024; // 11MB
382
-
383
- vi.mocked(fs.statSync).mockReturnValue({ size: largeFileSize } as fs.Stats);
384
-
385
- const result = handleEditVerification(
386
- mockEvent as any,
387
- mockWctx as any,
388
- { logger: mockLogger },
389
- { enabled: true, max_file_size_bytes: 10 * 1024 * 1024 }
390
- );
391
-
392
- expect(result).toBeUndefined();
393
- expect(mockLogger.warn).toHaveBeenCalledWith(
394
- expect.stringContaining('SKIPPING verification')
395
- );
396
- });
397
-
398
- it('should pass verification for files under max_file_size_bytes', () => {
399
- const smallFileSize = 1024; // 1KB
400
- const fileContent = 'const x = 1;';
401
-
402
- vi.mocked(fs.statSync).mockReturnValue({ size: smallFileSize } as fs.Stats);
403
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
404
-
405
- const result = handleEditVerification(
406
- mockEvent as any,
407
- mockWctx as any,
408
- { logger: mockLogger },
409
- { enabled: true }
410
- );
411
-
412
- expect(result).toBeUndefined();
413
- expect(mockLogger.info).toHaveBeenCalledWith(
414
- expect.stringContaining('File size check passed')
415
- );
416
- });
417
- });
418
-
419
- describe('permission error handling', () => {
420
- it('should block when stat() fails with EACCES', () => {
421
- vi.mocked(fs.statSync).mockImplementation(() => {
422
- const error = new Error('Permission denied') as any;
423
- error.code = 'EACCES';
424
- throw error;
425
- });
426
-
427
- const result = handleEditVerification(
428
- mockEvent as any,
429
- mockWctx as any,
430
- { logger: mockLogger },
431
- { enabled: true }
432
- );
433
-
434
- expect(result?.block).toBe(true);
435
- expect(result?.blockReason).toContain('Permission denied');
436
- expect(mockLogger.error).toHaveBeenCalledWith(
437
- expect.stringContaining('Permission denied')
438
- );
439
- });
440
-
441
- it('should block when readFileSync() fails with EACCES', () => {
442
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
443
- vi.mocked(fs.readFileSync).mockImplementation(() => {
444
- const error = new Error('Permission denied') as any;
445
- error.code = 'EACCES';
446
- throw error;
447
- });
448
-
449
- const result = handleEditVerification(
450
- mockEvent as any,
451
- mockWctx as any,
452
- { logger: mockLogger },
453
- { enabled: true }
454
- );
455
-
456
- expect(result?.block).toBe(true);
457
- expect(result?.blockReason).toContain('Permission denied');
458
- expect(result?.blockReason).toContain('Cannot read file');
459
- });
460
-
461
- it('should allow edit when file does not exist (ENOENT)', () => {
462
- vi.mocked(fs.statSync).mockImplementation(() => {
463
- const error = new Error('No such file') as any;
464
- error.code = 'ENOENT';
465
- throw error;
466
- });
467
-
468
- const result = handleEditVerification(
469
- mockEvent as any,
470
- mockWctx as any,
471
- { logger: mockLogger },
472
- { enabled: true }
473
- );
474
-
475
- expect(result).toBeUndefined();
476
- expect(mockLogger.warn).toHaveBeenCalledWith(
477
- expect.stringContaining('File not found')
478
- );
479
- });
480
- });
481
-
482
- describe('encoding error handling', () => {
483
- it('should block on encoding errors', () => {
484
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
485
- vi.mocked(fs.readFileSync).mockImplementation(() => {
486
- const error = new Error('Invalid UTF-8 sequence') as any;
487
- error.code = 'ERR_ENCODING';
488
- throw error;
489
- });
490
-
491
- const result = handleEditVerification(
492
- mockEvent as any,
493
- mockWctx as any,
494
- { logger: mockLogger },
495
- { enabled: true }
496
- );
497
-
498
- expect(result?.block).toBe(true);
499
- expect(result?.blockReason).toContain('Encoding error');
500
- expect(result?.blockReason).toContain('UTF-8');
501
- });
502
- });
503
-
504
- describe('fuzzy matching', () => {
505
- it('should auto-correct with fuzzy match when enabled', () => {
506
- const fileContent = 'const x = 1;';
507
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
508
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
509
-
510
- const result = handleEditVerification(
511
- mockEvent as any,
512
- mockWctx as any,
513
- { logger: mockLogger },
514
- {
515
- enabled: true,
516
- fuzzy_match_enabled: true,
517
- fuzzy_match_threshold: 0.8,
518
- }
519
- );
520
-
521
- expect(result).toBeDefined();
522
- expect(result?.params?.oldText).toBe('const x = 1;');
523
- expect(mockLogger.info).toHaveBeenCalledWith(
524
- expect.stringContaining('Fuzzy match found')
525
- );
526
- });
527
-
528
- it('should disable fuzzy match when fuzzy_match_enabled = false', () => {
529
- const fileContent = 'const x = 1;';
530
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
531
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
532
-
533
- const result = handleEditVerification(
534
- mockEvent as any,
535
- mockWctx as any,
536
- { logger: mockLogger },
537
- {
538
- enabled: true,
539
- fuzzy_match_enabled: false,
540
- }
541
- );
542
-
543
- expect(result?.block).toBe(true);
544
- expect(result?.blockReason).toContain('[P-03 Violation]');
545
- expect(mockLogger.error).toHaveBeenCalledWith(
546
- expect.stringContaining('Block edit')
547
- );
548
- });
549
-
550
- it('should respect custom fuzzy_match_threshold', () => {
551
- // Use content with whitespace differences to trigger fuzzy match
552
- const fileContent = 'const x = 1;\nconst y = 2;\nconst z = 3;'; // Extra spaces
553
- const event = {
554
- ...mockEvent,
555
- params: {
556
- ...mockEvent.params,
557
- oldText: 'const x = 1;\nconst y = 2;', // No extra spaces
558
- },
559
- };
560
-
561
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
562
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
563
-
564
- const result = handleEditVerification(
565
- event as any,
566
- mockWctx as any,
567
- { logger: mockLogger },
568
- {
569
- enabled: true,
570
- fuzzy_match_enabled: true,
571
- fuzzy_match_threshold: 0.6,
572
- }
573
- );
574
-
575
- // Fuzzy match should find and correct the text
576
- // 2/2 lines match (normalized) = 100% > 60%, should pass with fuzzy match
577
- expect(result?.params?.oldText).toBeTruthy();
578
- expect(result?.params?.oldText).toBe('const x = 1;\nconst y = 2;');
579
- });
580
- });
581
-
582
- describe('block on no match', () => {
583
- it('should block when oldText not found and fuzzy match fails', () => {
584
- const fileContent = 'different content';
585
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
586
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
587
-
588
- const result = handleEditVerification(
589
- mockEvent as any,
590
- mockWctx as any,
591
- { logger: mockLogger },
592
- { enabled: true }
593
- );
594
-
595
- expect(result?.block).toBe(true);
596
- expect(result?.blockReason).toContain('[P-03 Violation]');
597
- expect(result?.blockReason).toContain('Expected to find:');
598
- expect(result?.blockReason).toContain('Actual file contains:');
599
- expect(mockLogger.error).toHaveBeenCalledWith(
600
- expect.stringContaining('Block edit')
601
- );
602
- });
603
- });
604
-
605
- describe('parameter name conventions', () => {
606
- it('should handle old_string parameter name', () => {
607
- const event = {
608
- ...mockEvent,
609
- params: {
610
- file_path: 'src/example.ts',
611
- old_string: 'const x = 1;',
612
- newText: 'const x = 2;',
613
- },
614
- };
615
-
616
- const fileContent = 'const x = 1;';
617
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
618
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
619
-
620
- const result = handleEditVerification(
621
- event as any,
622
- mockWctx as any,
623
- { logger: mockLogger },
624
- { enabled: true }
625
- );
626
-
627
- expect(result).toBeUndefined();
628
- });
629
-
630
- it('should handle path parameter name', () => {
631
- const event = {
632
- ...mockEvent,
633
- params: {
634
- path: 'src/example.ts',
635
- oldText: 'const x = 1;',
636
- newText: 'const x = 2;',
637
- },
638
- };
639
-
640
- const fileContent = 'const x = 1;';
641
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
642
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
643
-
644
- const result = handleEditVerification(
645
- event as any,
646
- mockWctx as any,
647
- { logger: mockLogger },
648
- { enabled: true }
649
- );
650
-
651
- expect(result).toBeUndefined();
652
- });
653
-
654
- it('should handle file parameter name', () => {
655
- const event = {
656
- ...mockEvent,
657
- params: {
658
- file: 'src/example.ts',
659
- oldText: 'const x = 1;',
660
- newText: 'const x = 2;',
661
- },
662
- };
663
-
664
- const fileContent = 'const x = 1;';
665
- vi.mocked(fs.statSync).mockReturnValue({ size: 1024 } as fs.Stats);
666
- vi.mocked(fs.readFileSync).mockReturnValue(fileContent);
667
-
668
- const result = handleEditVerification(
669
- event as any,
670
- mockWctx as any,
671
- { logger: mockLogger },
672
- { enabled: true }
673
- );
674
-
675
- expect(result).toBeUndefined();
676
- });
677
- });
678
- });