Skip to content

executeTestOnDemand callback executed twice? #51

@lal65

Description

@lal65

Hopefully this is user error, but with the following:

const GhostInspector = require('ghost-inspector')(process.env.GI_API_KEY);

const test = require('my-test-file.json');
const options = { immediate: false };

GhostInspector.executeTestOnDemand(
  process.env.GI_ORGANIZATION_ID,
  test,
  options,
  function (err, result, passing) {
    if (err) {
      console.error(err);
    }
    console.log((passing ? '✅' : '❌') + ' my-test-file.json');
  }
);

this is the output:

user@host:/$ nvm use 20
Now using node v20.11.0 (npm v10.2.4)
user@host:/$ node ghostinspector-tests.js
❌ my-test-file.json
✅ my-test-file.json

It seems that for some reason, the callback is invoked twice?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions