Skip to content

Commit

Permalink
feat(packages/sui-react-web-vitals): unskip the test and log the meth…
Browse files Browse the repository at this point in the history
…od called
  • Loading branch information
nucliweb committed Feb 8, 2024
1 parent 30bc4da commit 15575a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/sui-react-web-vitals/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export default function WebVitalsReporter({
const target = getTarget({name, attribution})
const {loadState, eventType} = attribution

console.log('⛯ Core Web Vitals Logger')

logger.cwv({
name: `cwv.${name.toLowerCase()}`,
amount,
Expand Down
4 changes: 2 additions & 2 deletions packages/sui-react-web-vitals/test/browser/indexSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ describe('WebVitalsReporter', () => {
])
})

it.skip('should track inp with deviceMemory, networkConnection, and hardwareConcurrency using logger cwv', async () => {
it('should track inp with deviceMemory, networkConnection, and hardwareConcurrency using logger cwv', async () => {
const logger = {
cwv: sinon.spy()
}
Expand All @@ -306,7 +306,7 @@ describe('WebVitalsReporter', () => {
amount: 304,
path: '/',
target: undefined,
visibilityState: document.visibilityState,
visibilityState: 'hidden',
eventType: 'body',
deviceMemory: 8,
effectiveType: '4g',
Expand Down

0 comments on commit 15575a2

Please sign in to comment.