Skip to content

Commit fd60be8

Browse files
authored
feat: basic live app test (#554)
1 parent ff2eacd commit fd60be8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/ports.test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,20 @@ describe('Project statuses', () => {
4747
throw new Error(`${err} for ${name} on port number ${portNum}`);
4848
}
4949
});
50+
it(`Pinging ${name} should return a status code of 200 `, async () => {
51+
try {
52+
const response = await axios.get(
53+
`http://localhost:${portNum}/status/ping`
54+
);
55+
56+
// eslint-disable-next-line no-undef
57+
expect(response.status).toBe(200);
58+
} catch (err) {
59+
// Throw and error here to fail this test
60+
throw new Error(
61+
`${err} for ${name} on port number ${portNum} : status code 200 not returned`
62+
);
63+
}
64+
});
5065
}
5166
});

0 commit comments

Comments
 (0)