Skip to content

Commit cbf6a36

Browse files
committed
fix imports and add more tests
1 parent ad7e5b4 commit cbf6a36

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

e2e/preference/create.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { PreferenceCreateData } from '@src/clients/preference/create/types';
21
import MercadoPago, { Preference } from '@src/index';
32
import { config } from '../e2e.config';
3+
import type { PreferenceCreateData } from '@src/clients/preference/create/types';
44

55
describe('Preference IT, create', () => {
66
test('should create Preference and match response object', async () => {

e2e/preference/get.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { PreferenceCreateData } from '@src/clients/preference/create/types';
21
import MercadoPago, { Preference } from '@src/index';
32
import { config } from '../e2e.config';
3+
import type { PreferenceCreateData } from '@src/clients/preference/create/types';
44

55
describe('Preference IT, get', () => {
66
test('should get preference and match response object', async () => {

e2e/preference/search.spec.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ describe('Preference IT, search', () => {
1414
total: expect.any(Number),
1515
}));
1616
expect(searched.elements.length).toBeGreaterThan(0);
17+
expect(searched.elements[0]).toEqual(expect.objectContaining({
18+
id: expect.any(String),
19+
client_id: expect.any(String),
20+
collector_id: expect.any(Number),
21+
date_created: expect.any(String),
22+
expires: expect.any(Boolean),
23+
live_mode: expect.any(Boolean),
24+
marketplace: expect.any(String),
25+
operation_type: expect.any(String),
26+
site_id: expect.any(String),
27+
sponsor_id: expect.any(Number),
28+
shipping_mode: expect.any(String),
29+
}));
1730
});
18-
1931
});

e2e/preference/update.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { PreferenceCreateData } from '@src/clients/preference/create/types';
2-
import type { PreferenceUpdateData } from '@src/clients/preference/update/types';
31
import MercadoPago, { Preference } from '@src/index';
42
import { config } from '../e2e.config';
3+
import type { PreferenceCreateData } from '@src/clients/preference/create/types';
4+
import type { PreferenceUpdateData } from '@src/clients/preference/update/types';
55

66
describe('Preference IT, update', () => {
77
test('should update request and match response object', async () => {

0 commit comments

Comments
 (0)