Discard a test case(Request) while recording

For any reason if you want to avoid recording a request at run time you can use "discardRequest" API exposed by HyperTest SDK.

app.get('/api/getProducts', async (req: Request, res: Response) => {
    const data = await getProducts();
    htSdk.discardRequest(); // discard recorded test case of the current request
    res.send(data);
});

Last updated