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

DamianMullins / Coinsly / #321

28 Sep 2023 06:36AM UTC coverage: 82.759%. Remained the same
#321

push

web-flow
Bump get-func-name from 2.0.0 to 2.0.2 (#102)

Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

4 of 6 branches covered (0.0%)

Branch coverage included in aggregate %.

68 of 81 relevant lines covered (83.95%)

1.89 hits per line

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

69.44
/src/lib/coinHelper.js
1
const filterByDenomination = (coins, denomination) =>
1✔
2
  coins.filter(coin => coin.denomination === denomination);
1✔
3

1✔
4
const filterCoins = (coins, filter, denomination) => {
1✔
5
  const byDenomination = filterByDenomination(coins, denomination);
×
6

×
7
  switch (filter) {
×
8
    case 'Needed':
×
9
      return byDenomination.filter(coin => !coin.owned);
×
10
    case 'Owned':
×
11
      return byDenomination.filter(coin => coin.owned);
×
12
    default:
×
13
      return byDenomination;
×
14
  }
×
15
};
×
16

1✔
17
const getDenominations = coins => [
1✔
18
  ...new Set(
7✔
19
    coins.reduce((prev, coin) => {
7✔
20
      if (coin.denomination) {
8✔
21
        prev.push(coin.denomination);
6✔
22
      }
6✔
23

8✔
24
      return prev;
8✔
25
    }, [])
7✔
26
  )
7✔
27
];
7✔
28

1✔
29
export default {
1✔
30
  filterCoins,
1✔
31
  filterByDenomination,
1✔
32
  getDenominations
1✔
33
};
1✔
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