• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

snowcoders / jest-react-mock-utils / 17519210517

06 Sep 2025 08:29PM UTC coverage: 100.0%. Remained the same
17519210517

Pull #677

github

web-flow
Merge 4f132ebb4 into d058dd3ec
Pull Request #677: Update dependency lint-staged to v16.1.6

2 of 2 branches covered (100.0%)

Branch coverage included in aggregate %.

39 of 39 relevant lines covered (100.0%)

23.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/tests-functional-component/child-with-children/test-asset.parent.tsx
1
import React, { useState } from "react";
2
import { Child } from "./test-asset.child.js";
3

4
export const parentTestIdMap = {
2✔
5
  clickCount: "click-count",
6
  child: "child",
7
};
8

9
export type ParentProps = Record<keyof any, never>;
10

11
export function Parent(props: ParentProps) {
12
  const [clickCount, setClickCount] = useState(0);
20✔
13

14
  const handleChildClick = React.useCallback(() => {
20✔
15
    setClickCount(clickCount + 1);
8✔
16
  }, [clickCount, setClickCount]);
17

18
  return (
20✔
19
    <div>
20
      <h1>Real parent</h1>
21
      <div>
22
        Click count is <span data-testid={parentTestIdMap.clickCount}>{clickCount}</span>
23
      </div>
24
      <Child
25
        data-testid={parentTestIdMap.child}
26
        onClick={handleChildClick}
27
        someData="someData"
28
        onComplicatedCallback={() => {}}
29
      >
30
        Increment
31
      </Child>
32
    </div>
33
  );
34
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc