Skip to content

Commit d031678

Browse files
authored
fix: add prod test and join pull request together (#124)
1 parent b7a1b8e commit d031678

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

packages/sdk/test/client-apimock.test.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,41 @@ const clientId = 'testClientId';
2828
const redirectUri = 'http://example.com';
2929

3030
let client: MoneriumClient;
31-
describe('MoneriumClient', () => {
31+
describe.only('MoneriumClient - production', () => {
32+
beforeAll(() => {
33+
Object.defineProperty(window, 'location', {
34+
value: {
35+
assign: assignMock,
36+
},
37+
writable: true,
38+
});
39+
});
40+
afterEach(() => {
41+
window.localStorage.clear();
42+
jest.restoreAllMocks();
43+
assignMock.mockRestore();
44+
});
45+
test('get tokens', async () => {
46+
const client = new MoneriumClient({
47+
environment: 'production',
48+
clientId,
49+
redirectUri,
50+
});
51+
await client.getTokens().catch(() => ({}));
52+
53+
expect(fetchMock?.mock?.calls?.length).toEqual(1);
54+
55+
expect(fetchMock?.mock?.calls?.[0]?.[0]).toEqual(
56+
`https://api.monerium.app/tokens`
57+
);
58+
expect(fetchMock?.mock?.calls?.[0]?.[1]).toEqual(
59+
expect.objectContaining({
60+
method: 'GET',
61+
})
62+
);
63+
});
64+
});
65+
describe('MoneriumClient - sandbox', () => {
3266
beforeAll(() => {
3367
Object.defineProperty(window, 'location', {
3468
value: {

release-please-config.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"pull-request-title-pattern": "Release ${component} ${version} :rocket:",
33
"pull-request-header": ":robot: I have created a release *beep* *boop*",
4-
"separate-pull-requests": true,
54
"changelog-sections": [
65
{ "type": "feat", "section": "Features", "hidden": false },
76
{ "type": "fix", "section": "Bug Fixes", "hidden": false },

0 commit comments

Comments
 (0)