Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sumxu96 committed Oct 2, 2024
1 parent 0da12df commit a25b3a3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/offramp/generateOffRampURL.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,15 @@ describe('generateOffRampURL', () => {
);
expect(url.searchParams.get('defaultNetwork')).toEqual('ethereum');
});

it('should support sessionToken', () => {
const url = new URL(
generateOffRampURL({
sessionToken: 'test',
}),
);
expect(url.origin).toEqual('https://pay.coinbase.com');
expect(url.pathname).toEqual('/v3/sell/input');
expect(url.searchParams.get('sessionToken')).toEqual('test');
});
});

0 comments on commit a25b3a3

Please sign in to comment.