Skip to content

Commit ec3345f

Browse files
changed pact
1 parent eda76f0 commit ec3345f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/api.pact.spec.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ describe('API Pact test', () => {
1616
describe('retrieving a product', () => {
1717
test('ID 10 exists', async () => {
1818
// Arrange
19-
// const expectedProduct = {
20-
// id: '10',
21-
// type: 'CREDIT_CARD',
22-
// name: '28 Degrees'
23-
// };
19+
const expectedProduct = {
20+
id: '10',
21+
type: 'CREDIT_CARD',
22+
name: '28 Degrees',
23+
date: "11/02/2024"
24+
};
2425

2526
// Uncomment to see this fail
26-
const expectedProduct = { id: '10', type: 'CREDIT_CARD', name: '28 Degrees', price: 30.0, newField: 22}
27+
// const expectedProduct = { id: '10', type: 'CREDIT_CARD', name: '28 Degrees', price: 30.0, newField: 22}
2728

2829
mockProvider
2930
.given('a product with ID 10 exists')

src/product.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
export class Product {
2-
constructor({id, name, type}) {
2+
constructor({id, name, type, date}) {
33
this.id = id
44
this.name = name
55
this.type = type
6+
this.date = date
67
}
78
}

0 commit comments

Comments
 (0)