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

mizchi / next-editor / 1448

28 Feb 2024 12:17PM UTC coverage: 42.344% (+0.6%) from 41.712%
1448

Pull #349

circleci

web-flow
chore(deps): update babel monorepo
Pull Request #349: chore(deps): update babel monorepo

95 of 450 branches covered (21.11%)

Branch coverage included in aggregate %.

967 of 2058 relevant lines covered (46.99%)

1.93 hits per line

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

0.0
/src/ui/components/organisms/GitViewer/helpers.ts
1
import invertBy from "lodash/invertBy"
×
2
import { GitStagingStatus, GitStatusString } from "./../../../../domain/types"
3

4
export const STAGED_KEYS: GitStatusString[] = ["modified", "deleted", "added"]
×
5
export const MODIFIED_KEYS: GitStatusString[] = [
×
6
  "*modified",
7
  "*deleted",
8
  "*absent"
9
]
10
export const UNTRAKED_KEYS: GitStatusString[] = ["*added"]
×
11

12
export function buildGroupedGitStatus(staging: GitStagingStatus) {
×
13
  const inv: { [s in GitStatusString]: string[] | null } = invertBy(
×
14
    staging
15
  ) as any
16
  const hasStaged: boolean = STAGED_KEYS.some(key => !!(inv as any)[key])
×
17
  const hasModified: boolean = MODIFIED_KEYS.some(key => !!(inv as any)[key])
×
18
  const hasUntracked: boolean = UNTRAKED_KEYS.some(key => !!(inv as any)[key])
×
19
  const hasError: boolean = !!inv.__error__
×
20
  const hasChanges = hasStaged || hasModified
×
21
  return {
×
22
    grouped: inv,
23
    hasStaged,
24
    hasModified,
25
    hasUntracked,
26
    hasError,
27
    hasChanges
28
  }
29
}
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