Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"test:e2e:chrome": "playwright test --project=chrome",
"test:e2e:msedge": "playwright test --project=msedge",
"test:e2e:report": "playwright show-report tests/e2e/playwright-report",
"test:ci": "pnpm test -- --reporters=default --reporters=github-actions"
"test:ci": "jest --reporters=default --reporters=github-actions"
},
"dependencies": {
"@interledger/open-payments": "^7.0.0",
Expand Down
38 changes: 19 additions & 19 deletions src/background/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ describe('convertWithExchangeRate', () => {
to: 'GBP',
amounts: [
{ input: '1', expected: '1' },
{ input: '10', expected: '9' },
{ input: '10', expected: '8' },
{ input: '100', expected: '81' },
{ input: '10000', expected: '8065' },
{ input: '15', expected: '13' },
{ input: '15', expected: '12' },
{ input: '2', expected: '2' },
{ input: '200', expected: '162' },
{ input: '200', expected: '161' },
],
},
{
Expand All @@ -140,12 +140,12 @@ describe('convertWithExchangeRate', () => {
amounts: [
{ input: '1', expected: '1' },
{ input: '10', expected: '10' },
{ input: '100', expected: '97' },
{ input: '10000', expected: '9616' },
{ input: '15', expected: '15' },
{ input: '100', expected: '96' },
{ input: '10000', expected: '9615' },
{ input: '15', expected: '14' },
{ input: '2', expected: '2' },
{ input: '200', expected: '193' },
{ input: 200n, expected: 193n },
{ input: '200', expected: '192' },
{ input: 200n, expected: 192n },
],
},
{
Expand All @@ -156,11 +156,11 @@ describe('convertWithExchangeRate', () => {
{ input: '1', expected: '21' },
{ input: '10', expected: '206' },
{ input: '100', expected: '2058' },
{ input: '10000', expected: '205762' },
{ input: '10000', expected: '205761' },
{ input: '15', expected: '309' },
{ input: '2', expected: '42' },
{ input: '200', expected: '4116' },
{ input: 200n, expected: 4116n },
{ input: '2', expected: '41' },
{ input: '200', expected: '4115' },
{ input: 200n, expected: 4115n },
],
},
{
Expand All @@ -183,12 +183,12 @@ describe('convertWithExchangeRate', () => {
from: 'GBP',
to: 'USD',
amounts: [
{ input: '1', expected: '2' },
{ input: '10', expected: '13' },
{ input: '1', expected: '1' },
{ input: '10', expected: '12' },
{ input: '100', expected: '124' },
{ input: '10000', expected: '12400' },
{ input: '15', expected: '19' },
{ input: '2', expected: '3' },
{ input: '2', expected: '2' },
{ input: '200', expected: '248' },
],
},
Expand All @@ -198,13 +198,13 @@ describe('convertWithExchangeRate', () => {
to: 'JPY',
toAssetScale: 3,
amounts: [
{ input: '1', expected: '1539' },
{ input: '1', expected: '1538' },
{ input: '10', expected: '15385' },
{ input: '100', expected: '153847' },
{ input: '10000', expected: '15384616' },
{ input: '100', expected: '153846' },
{ input: '10000', expected: '15384615' },
{ input: '15', expected: '23077' },
{ input: '2', expected: '3077' },
{ input: '200', expected: '307693' },
{ input: '200', expected: '307692' },
],
},
];
Expand Down
4 changes: 3 additions & 1 deletion src/content/__tests__/monetizationLinkManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,9 @@ describe('document events', () => {
await nextTick();

const requestId = 'uuid-1';
expect(msg.STOP_MONETIZATION).toHaveBeenCalledWith([{ requestId }]);
expect(msg.STOP_MONETIZATION).toHaveBeenCalledWith([
{ requestId, intent: 'pause' },
]);

documentVisibilityState.mockReturnValueOnce('visible');
document.dispatchEvent(new window.Event('visibilitychange'));
Expand Down