Skip to content

Commit 7d4e944

Browse files
committed
Revamp the test suite
1 parent 59be3ba commit 7d4e944

File tree

3 files changed

+536
-142
lines changed

3 files changed

+536
-142
lines changed

fixtures/eslint/index.js

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,26 @@
44
// 2. "File > Add Folder to Workspace" this specific folder in VSCode with ESLint extension
55
// 3. Changes to the rule source should get picked up without restarting ESLint server
66

7-
8-
9-
function Comment({
10-
comment,
11-
commentSource,
12-
}) {
13-
const currentUserID = comment.viewer.id;
14-
const environment = RelayEnvironment.forUser(currentUserID);
15-
const commentID = nullthrows(comment.id);
16-
useEffect(() => {
17-
const subscription = SubscriptionCounter.subscribeOnce(
18-
`StoreSubscription_${commentID}`,
19-
() =>
20-
StoreSubscription.subscribe(
21-
environment,
22-
{
23-
comment_id: commentID,
24-
},
25-
currentUserID,
26-
commentSource
27-
)
28-
);
29-
return () => subscription.dispose();
30-
}, [commentID, environment, currentUserID, commentSource]);
31-
}
32-
7+
function Comment({comment, commentSource}) {
8+
const currentUserID = comment.viewer.id;
9+
const environment = RelayEnvironment.forUser(currentUserID);
10+
const commentID = nullthrows(comment.id);
11+
useEffect(
12+
() => {
13+
const subscription = SubscriptionCounter.subscribeOnce(
14+
`StoreSubscription_${commentID}`,
15+
() =>
16+
StoreSubscription.subscribe(
17+
environment,
18+
{
19+
comment_id: commentID,
20+
},
21+
currentUserID,
22+
commentSource
23+
)
24+
);
25+
return () => subscription.dispose();
26+
},
27+
[commentID, environment, currentUserID, commentSource]
28+
);
29+
}

0 commit comments

Comments
 (0)