saucelabs / node-saucelabs

A wrapper around Sauce Labs API
Apache License 2.0
93 stars 44 forks source link

Resolves #263 #264

Closed waggledans closed 2 months ago

waggledans commented 2 months ago

One-line summary

Issue : #263

support query parameters that contain an underscore.

Description

With this implementation, if a query param is not camelCased, both the camelCased and the original param would work (i.e. in case of auto_only, both auto_only and autoOnly are accepted). I'm not sure what the intention was before, possibly to support the camelCased option only.

For example:

  await api.listJobs(process.env.SAUCE_USERNAME, {auto_only: true});
 // await api.listJobs(process.env.SAUCE_USERNAME, {autoOnly: true});
$ bin/sl listJobs $SAUCE_USERNAME 1
Error: Failed calling listJobs: Response code 400 (Bad Request), {"message":"Invalid combination of arguments."} 

Types of Changes

What types of changes does your code introduce? Keep the ones that apply: