To test an Express API, you export the application without listening on a port, then send simulated requests with a tool like Supertest and check the status and body. Tests rely on Node's test runner or another runner and must be isolated from one another.
Example
const res = await request(app).get('/users');
assert.equal(res.status, 200);