Giter Club home page Giter Club logo

Comments (2)

wswebcreation avatar wswebcreation commented on July 26, 2024

@christian-bromann

There seems to be some strange behaviour in the code. The internal code for downloading the job asset needs 3 arguments, see https://github.com/saucelabs/node-saucelabs/blob/master/src/index.js#L175

The docs tell this

GET /v1/jobs/{id}/{assetName}
No description available.
Example:
api.downloadJobAsset(id, filename)

The index.d.ts that is generated says this

  /**
   * Get job asset
   * @method
   * @name SauceLabs#downloadJobAsset
   * @param {string} id - job id
   * @param {string} filename - filename
   */
  downloadJobAsset(id: string, filename: string): Promise<File>;

A quick and dirty fix like below would solve the problem for now by adding the blow code here https://github.com/saucelabs/node-saucelabs/blob/master/src/index.js#L182

    if(!downloadPath){
        downloadPath = `./${assetName}`
    }

But the docs and index.d.ts are not aligned with the code.

What do you think?

from node-saucelabs.

christian-bromann avatar christian-bromann commented on July 26, 2024

@tborys thanks for reporting the issue and @wswebcreation thanks for looking into it. I updated the docs to reflect this command a bit better. It will only store the asset to your FS if you provide a 3rd parameter because sometimes you want to work with the job asset in your script without storing it.

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.