Skip to content

Commit 6424934

Browse files
author
Brian Vaughn
committed
Enabled external hooks test
1 parent bf25f05 commit 6424934

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/react-devtools-extensions/src/__tests__/parseHookNames-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ describe('parseHookNames', () => {
246246
await test('./__source__/__compiled__/external/ComponentWithCustomHook'); // external source map
247247
});
248248

249-
// TODO (named hooks) The useContext() line number is slightly off
250-
xit('should work for external hooks', async () => {
249+
it('should work for external hooks', async () => {
251250
async function test(path) {
252251
const Component = require(path).Component;
253252
const hookNames = await getHookNamesForComponent(Component);
@@ -257,7 +256,9 @@ describe('parseHookNames', () => {
257256
]);
258257
}
259258

260-
await test('./__source__/ComponentWithExternalCustomHooks'); // original source (uncompiled)
259+
// We can't test the uncompiled source here, because it either needs to get transformed,
260+
// which would break the source mapping, or the import statements will fail.
261+
261262
await test(
262263
'./__source__/__compiled__/inline/ComponentWithExternalCustomHooks',
263264
); // inline source map

0 commit comments

Comments
 (0)