Skip to content

Commit

Permalink
feat: add rum api calls to shared
Browse files Browse the repository at this point in the history
  • Loading branch information
alinarublea committed Dec 14, 2023
1 parent d0b6ee3 commit 1bae4a4
Showing 1 changed file with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,26 @@ describe('rum api client', () => {
.query({
domainkey: 'hebele',
})
.reply(200, JSON.stringify({ results: { data: [] } }));
.reply(200, JSON.stringify({
results: {
data: [{
url: 'http://spacecar.com',
pageviews: 11000,
avgcls: 0.148,
avginp: 65,
avglcp: 5239,
}],
},
}));
const rumApiClient = RUMAPIClient.createFrom({ env: { RUM_API_KEY: 'hebele' } });
await expect(rumApiClient.getRUMDashboard())
.to.be.fulfilled;
.to.eventually.eql([{
url: 'http://spacecar.com',
pageviews: 11000,
avgcls: 0.148,
avginp: 65,
avglcp: 5239,
}]);
});

it('returns data when get404Checkpoints api is successful', async () => {
Expand Down

0 comments on commit 1bae4a4

Please sign in to comment.