Giter Club home page Giter Club logo

Comments (5)

danjenkins avatar danjenkins commented on August 30, 2024

hi @mekdev , I'm not quite sure why you wouldn't ever want to know if the call to saucelabs succeeded or not?

from node-saucelabs.

danjenkins avatar danjenkins commented on August 30, 2024

@mekdev if I don't hear back from you I'll close this issue in a couple of days

from node-saucelabs.

PhearZero avatar PhearZero commented on August 30, 2024

@mekdev @danjenkins Looks like the api supports callbacks and mocha allows callbacks with done. Here is a basic example

describe('Mocha tests', function () {
    var SauceLabs = require('saucelabs');
    var sauce;

    beforeEach(function () {
        var config = {
            username: process.env.SAUCE_USERNAME,
            password: process.env.SAUCE_ACCESS_KEY
        };

        sauce  = new SauceLabs(config);
    });

    afterEach(function () {
        sauce  = null;
    });

    it('should pass done callback for mocha', function (done) {
        sauce.getJobs(done);
    });

});

from node-saucelabs.

mekdev avatar mekdev commented on August 30, 2024

Hi guys,

Sorry for the delay, my intention wasn't to iqnore errors when omitting callbacks.
I was merely looking for a sync-like behavior (java/ruby) that would just block execution and throw error.

Our test pattern heavily uses co and the mocha promise manager from https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs and we omit mocha done entirely.

The reason I requested this in the beginning is that I wanted to maintain our non-callback usage structure in our tests. Since then we have found our way around this by implementing our owner reporter and the tests looks alot cleaner now.

Please feel free to resolve as not fixed.

from node-saucelabs.

danjenkins avatar danjenkins commented on August 30, 2024

Great, thank you @mekdev !

from node-saucelabs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.