node-testrail-api icon indicating copy to clipboard operation
node-testrail-api copied to clipboard

My code is working in a mocha before(), but not in an after(), is there any known reason for this?

Open ramsenc opened this issue 4 years ago • 0 comments

The following code block works with a runId printing:

before(function () {
    testrail.getRuns(/*PROJECT_ID=*/1, /*FILTERS=*/{}, function (err, response, runs) {
        let runId = runs[0].id
        console.log('runId:', runId)
    });
})

This code does not work with no print occurring at all. There is no error either as err is null.

after(function () {
    testrail.getRuns(/*PROJECT_ID=*/1, /*FILTERS=*/{}, function (err, response, runs) {
        let runId = runs[0].id
        console.log('runId:', runId)
    });
})

I've used this before without the issue, but now this is happening in a new implementation. What could be causing this?

ramsenc avatar Aug 11 '21 09:08 ramsenc