Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executeTestOnDemand callback executed twice? #51

Open
lal65 opened this issue Jan 31, 2024 · 0 comments
Open

executeTestOnDemand callback executed twice? #51

lal65 opened this issue Jan 31, 2024 · 0 comments

Comments

@lal65
Copy link

lal65 commented Jan 31, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant