@@ -21,6 +21,7 @@ describe("keyword-detector message transform", () => {
2121 afterEach ( ( ) => {
2222 logSpy ?. mockRestore ( )
2323 getMainSessionSpy ?. mockRestore ( )
24+ _resetForTesting ( )
2425 } )
2526
2627 function createMockPluginInput ( ) {
@@ -101,7 +102,7 @@ describe("keyword-detector session filtering", () => {
101102 let logSpy : ReturnType < typeof spyOn >
102103
103104 beforeEach ( ( ) => {
104- setMainSession ( undefined )
105+ _resetForTesting ( )
105106 logCalls = [ ]
106107 logSpy = spyOn ( sharedModule , "log" ) . mockImplementation ( ( msg : string , data ?: unknown ) => {
107108 logCalls . push ( { msg, data } )
@@ -110,7 +111,7 @@ describe("keyword-detector session filtering", () => {
110111
111112 afterEach ( ( ) => {
112113 logSpy ?. mockRestore ( )
113- setMainSession ( undefined )
114+ _resetForTesting ( )
114115 } )
115116
116117 function createMockPluginInput ( options : { toastCalls ?: string [ ] } = { } ) {
@@ -246,7 +247,7 @@ describe("keyword-detector word boundary", () => {
246247 let logSpy : ReturnType < typeof spyOn >
247248
248249 beforeEach ( ( ) => {
249- setMainSession ( undefined )
250+ _resetForTesting ( )
250251 logCalls = [ ]
251252 logSpy = spyOn ( sharedModule , "log" ) . mockImplementation ( ( msg : string , data ?: unknown ) => {
252253 logCalls . push ( { msg, data } )
@@ -255,7 +256,7 @@ describe("keyword-detector word boundary", () => {
255256
256257 afterEach ( ( ) => {
257258 logSpy ?. mockRestore ( )
258- setMainSession ( undefined )
259+ _resetForTesting ( )
259260 } )
260261
261262 function createMockPluginInput ( options : { toastCalls ?: string [ ] } = { } ) {
@@ -343,7 +344,7 @@ describe("keyword-detector system-reminder filtering", () => {
343344 let logSpy : ReturnType < typeof spyOn >
344345
345346 beforeEach ( ( ) => {
346- setMainSession ( undefined )
347+ _resetForTesting ( )
347348 logCalls = [ ]
348349 logSpy = spyOn ( sharedModule , "log" ) . mockImplementation ( ( msg : string , data ?: unknown ) => {
349350 logCalls . push ( { msg, data } )
@@ -352,7 +353,7 @@ describe("keyword-detector system-reminder filtering", () => {
352353
353354 afterEach ( ( ) => {
354355 logSpy ?. mockRestore ( )
355- setMainSession ( undefined )
356+ _resetForTesting ( )
356357 } )
357358
358359 function createMockPluginInput ( ) {
@@ -534,7 +535,7 @@ describe("keyword-detector agent-specific ultrawork messages", () => {
534535 let logSpy : ReturnType < typeof spyOn >
535536
536537 beforeEach ( ( ) => {
537- setMainSession ( undefined )
538+ _resetForTesting ( )
538539 logCalls = [ ]
539540 logSpy = spyOn ( sharedModule , "log" ) . mockImplementation ( ( msg : string , data ?: unknown ) => {
540541 logCalls . push ( { msg, data } )
@@ -543,7 +544,7 @@ describe("keyword-detector agent-specific ultrawork messages", () => {
543544
544545 afterEach ( ( ) => {
545546 logSpy ?. mockRestore ( )
546- setMainSession ( undefined )
547+ _resetForTesting ( )
547548 } )
548549
549550 function createMockPluginInput ( ) {
0 commit comments