Skip to content

Commit

Permalink
fixup! [Tests] Component util isReactHookCall
Browse files Browse the repository at this point in the history
Self-test the testComponentsDetect function to ensure Program:exit instruction is augmented with visit-logging behavior
  • Loading branch information
duncanbeevers committed Dec 16, 2021
1 parent 2f212c6 commit f06944d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/util/Components.js
Expand Up @@ -286,5 +286,17 @@ describe('Components', () => {
});
});
});

describe('testComponentsDetect', () => {
it('should log Program:exit instruction', () => {
testComponentsDetect({
code: '',
}, {
'Program:exit': () => true,
}, (_components, instructionResults) => {
assert.deepEqual(instructionResults, [{ type: 'Program:exit', result: true }]);
});
});
});
});
});

0 comments on commit f06944d

Please sign in to comment.