Skip to content

Commit 99f0ea7

Browse files
authored
Expect mass > 0 for shipping estimates since test values are randomized (#76)
1 parent 83aab5a commit 99f0ea7

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Diff for: test/integration/estimates.test.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('Estimates Integration', function () {
149149
const estimate = createEstimateResponse.data;
150150

151151
expect(estimate.order).to.be.eq(null);
152-
expect(estimate.mass_g).to.be.above(5_000);
152+
expect(estimate.mass_g).to.be.above(0);
153153
expect(estimate.production).to.be.eq(false);
154154
expect(estimate.type).to.be.eq('shipping_air');
155155
});
@@ -165,8 +165,8 @@ describe('Estimates Integration', function () {
165165
});
166166
const estimate = createEstimateResponse.data;
167167

168-
expect(estimate.order.amount).to.be.above(500);
169-
expect(estimate.mass_g).to.be.above(5_000);
168+
expect(estimate.order.amount).to.be.above(0);
169+
expect(estimate.mass_g).to.be.above(0);
170170
expect(estimate.production).to.be.eq(false);
171171
expect(estimate.type).to.be.eq('shipping_air');
172172
});
@@ -183,7 +183,7 @@ describe('Estimates Integration', function () {
183183
const estimate = createEstimateResponse.data;
184184

185185
expect(estimate.order).to.be.eq(null);
186-
expect(estimate.mass_g).to.be.above(300);
186+
expect(estimate.mass_g).to.be.above(0);
187187
expect(estimate.production).to.be.eq(false);
188188
expect(estimate.type).to.be.eq('shipping_rail');
189189
});
@@ -198,7 +198,7 @@ describe('Estimates Integration', function () {
198198
const estimate = createEstimateResponse.data;
199199

200200
expect(estimate.order).to.be.eq(null);
201-
expect(estimate.mass_g).to.be.above(800);
201+
expect(estimate.mass_g).to.be.above(0);
202202
expect(estimate.production).to.be.eq(false);
203203
expect(estimate.type).to.be.eq('shipping_rail');
204204
});
@@ -213,8 +213,8 @@ describe('Estimates Integration', function () {
213213
});
214214
const estimate = createEstimateResponse.data;
215215

216-
expect(estimate.order.amount).to.be.above(200);
217-
expect(estimate.mass_g).to.be.above(900);
216+
expect(estimate.order.amount).to.be.above(0);
217+
expect(estimate.mass_g).to.be.above(0);
218218
expect(estimate.production).to.be.eq(false);
219219
expect(estimate.type).to.be.eq('shipping_rail');
220220
});
@@ -231,7 +231,7 @@ describe('Estimates Integration', function () {
231231
const estimate = createEstimateResponse.data;
232232

233233
expect(estimate.order).to.be.eq(null);
234-
expect(estimate.mass_g).to.be.above(500);
234+
expect(estimate.mass_g).to.be.above(0);
235235
expect(estimate.production).to.be.eq(false);
236236
expect(estimate.type).to.be.eq('shipping_road');
237237
});
@@ -246,7 +246,7 @@ describe('Estimates Integration', function () {
246246
const estimate = createEstimateResponse.data;
247247

248248
expect(estimate.order).to.be.eq(null);
249-
expect(estimate.mass_g).to.be.above(5_000);
249+
expect(estimate.mass_g).to.be.above(0);
250250
expect(estimate.production).to.be.eq(false);
251251
expect(estimate.type).to.be.eq('shipping_road');
252252
});
@@ -261,8 +261,8 @@ describe('Estimates Integration', function () {
261261
});
262262
const estimate = createEstimateResponse.data;
263263

264-
expect(estimate.order.amount).to.be.above(500);
265-
expect(estimate.mass_g).to.be.above(5_000);
264+
expect(estimate.order.amount).to.be.above(0);
265+
expect(estimate.mass_g).to.be.above(0);
266266
expect(estimate.production).to.be.eq(false);
267267
expect(estimate.type).to.be.eq('shipping_road');
268268
});
@@ -279,7 +279,7 @@ describe('Estimates Integration', function () {
279279
const estimate = createEstimateResponse.data;
280280

281281
expect(estimate.order).to.be.eq(null);
282-
expect(estimate.mass_g).to.be.above(500);
282+
expect(estimate.mass_g).to.be.above(0);
283283
expect(estimate.production).to.be.eq(false);
284284
expect(estimate.type).to.be.eq('shipping_sea');
285285
});
@@ -294,7 +294,7 @@ describe('Estimates Integration', function () {
294294
const estimate = createEstimateResponse.data;
295295

296296
expect(estimate.order).to.be.eq(null);
297-
expect(estimate.mass_g).to.be.above(1_000);
297+
expect(estimate.mass_g).to.be.above(0);
298298
expect(estimate.production).to.be.eq(false);
299299
expect(estimate.type).to.be.eq('shipping_sea');
300300
});
@@ -309,8 +309,8 @@ describe('Estimates Integration', function () {
309309
});
310310
const estimate = createEstimateResponse.data;
311311

312-
expect(estimate.order.amount).to.be.above(500);
313-
expect(estimate.mass_g).to.be.above(1_500);
312+
expect(estimate.order.amount).to.be.above(0);
313+
expect(estimate.mass_g).to.be.above(0);
314314
expect(estimate.production).to.be.eq(false);
315315
expect(estimate.type).to.be.eq('shipping_sea');
316316
});

0 commit comments

Comments
 (0)