Coveralls logob
Coveralls logo
  • Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

playwright-community / playwright-jest-examples / 141271313

19 Jun 2020 - 20:33 coverage: 90.0% (+90.0%) from 0.0%
141271313

push

github

GitHub
fix: create-react-app coverage reporting (#7)

9 of 10 relevant lines covered (90.0%)

14.4 hits per line

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

88.89
/create-react-app-coverage/src/App.tsx
1
import React from 'react';
2
import logo from './logo.svg';
3
import './App.css';
4

5
const App = () => {
9×
6
  const [backgroundColor, setBackgroundColor] = React.useState("#1abc9c")
24×
7
  const handleMakeTurquoise = () => {
24×
8
    setBackgroundColor("#1abc9c")
3×
9
  }
10
  const handleMakeRed = () => {
24×
11
    setBackgroundColor("#e74c3c")
3×
12
  }
13
  const handleMakeYellow = () => {
24×
14
    setBackgroundColor("#f1c40f")
!
15
  }
16
  return (
24×
17
    <div className="App">
18
      <header className="App-header" style={{ backgroundColor }}>
19
        <img src={logo} className="App-logo" alt="logo" />
20
        <p>
21
          Edit <code>src/App.js</code> and save to reload.
22
        </p>
23
        <a
24
          className="App-link"
25
          href="https://reactjs.org"
26
          target="_blank"
27
          rel="noopener noreferrer"
28
        >
29
          Learn React
30
        </a>
31
        <span>Current color: {backgroundColor}</span>
32
        <div className="btn-group-colors">
33
          <button onClick={handleMakeTurquoise}>Turquoise</button>
34
          <button onClick={handleMakeRed}>Red</button>
35
          <button onClick={handleMakeYellow}>Yellow</button>
36
        </div>
37
      </header>
38
    </div>
39
  );
40
}
41

42
export default App;
Troubleshooting · Open an Issue · Sales · Support · ENTERPRISE · CAREERS · STATUS
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2023 Coveralls, Inc