We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9681f2 commit bfd29e2Copy full SHA for bfd29e2
packages/api/tests/index.test.ts
@@ -16,3 +16,15 @@ test('Read product and typecheck SKU', async () => {
16
expect(data.sku).toBeTypeOf('string');
17
expect(data._id).toBe(productId);
18
});
19
+
20
+test('404 with different Store ID from env', async () => {
21
+ process.env.ECOM_STORE_ID = '1011';
22
+ try {
23
+ const { data } = await api.get(`products/${productId}`);
24
+ console.log(data);
25
+ throw new Error('Should have thrown not found');
26
+ } catch (error: any) {
27
+ expect(error.statusCode).toBe(404);
28
+ expect(error.response?.status).toBe(404);
29
+ }
30
+});
0 commit comments