Skip to content

Commit f06944d

Browse files
committed
fixup! [Tests] Component util isReactHookCall
Self-test the testComponentsDetect function to ensure Program:exit instruction is augmented with visit-logging behavior
1 parent 2f212c6 commit f06944d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/util/Components.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,17 @@ describe('Components', () => {
286286
});
287287
});
288288
});
289+
290+
describe('testComponentsDetect', () => {
291+
it('should log Program:exit instruction', () => {
292+
testComponentsDetect({
293+
code: '',
294+
}, {
295+
'Program:exit': () => true,
296+
}, (_components, instructionResults) => {
297+
assert.deepEqual(instructionResults, [{ type: 'Program:exit', result: true }]);
298+
});
299+
});
300+
});
289301
});
290302
});

0 commit comments

Comments
 (0)