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

Khan / perseus / 5478114505 / 2 – jest
69%
main: 69%

Build:
Build:
LAST BUILD BRANCH: LC-1092
DEFAULT BRANCH: main
Ran 06 Jul 2023 05:07PM UTC
Files 512
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jul 2023 04:55PM UTC coverage: 63.045% (-0.006%) from 63.051%
jest – 5478114505.2

push

github

web-flow
[Analytics] 1. Introduce DependenciesContext (#600)

## Summary:

This PR introduces a new React Context for plumbing dependencies through Perseus. The context uses a new type `PerseusDependenciesV2` (so it doesn't conflict with the original `PerseusDependencies`). 

This PR also provides a React hook (`useDependencies`) for accessing dependencies. This hook will commonly be used in wrapper component to attach dependencies to the wrapped component (next PR). 

I also renamed `sendEvent` to `onAnalyticsEvent` as that feels more natural for a callback (especially event callback... a la 'onClick`). This causes a bit more churn but hopefully that's ok as we're early in the analytics journey.

Issue: LC-950

## Test plan:

`yarn test`
`yarn tsc`

Author: jeremywiebe

Reviewers: nedredmond, eamspoker, jeremywiebe, handeyeco

Required Reviewers:

Approved By: nedredmond

Checks: ✅ finish_coverage, ✅ finish_coverage, ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Extract i18n strings (ubuntu-latest, 16.x), ✅ Jest Coverage (ubuntu-latest, 16.x), ✅ Check builds for changes in size (ubuntu-latest, 16.x), ✅ Lint, Typecheck, and Test (ubuntu-latest, 16.x), ✅ Check for .changeset file (ubuntu-latest, 16.x), ✅ Cypress Coverage (ubuntu-latest, 16.x), ✅ gerald, ✅ gerald, ⏭  Publish npm snapshot, ✅ Extract i18n strings (ubuntu-latest, 16.x), ✅ Check builds for changes in size (ubuntu-latest, 16.x), ✅ Lint, Typecheck, and Test (ubuntu-latest, 16.x), ✅ Cypress Coverage (ubuntu-latest, 16.x), ✅ Check for .changeset file (ubuntu-latest, 16.x), ✅ Jest Coverage (ubuntu-latest, 16.x), ✅ gerald

Pull Request URL: https://github.com/Khan/perseus/pull/600

5624 of 6795 branches covered (82.77%)

Branch coverage included in aggregate %.

67009 of 108413 relevant lines covered (61.81%)

473.19 hits per line

Source Files on job jest - 5478114505.2
  • Tree
  • List 0
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 5478114505
  • dd800c22 on github
  • Prev Job for on feature/analytics (#5427887574.2)
  • Next Job for on feature/analytics (#5478332566.2)
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

© 2026 Coveralls, Inc