Skip to content

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

@ramsenc

Description

@ramsenc

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions