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

falsy params support #36

Open
dzubitskyi opened this issue May 30, 2022 · 1 comment
Open

falsy params support #36

dzubitskyi opened this issue May 30, 2022 · 1 comment

Comments

@dzubitskyi
Copy link

To have capability to update a Thunder properties with any falsy https://developer.mozilla.org/en-US/docs/Glossary/Falsy values, the current makeBody functionality needs to be improved.

Expected test suite

https://github.com/rdkcentral/ThunderJS/blob/master/tests/thunderJS.calls.spec.js

test('thunderJS - calls - argument based - empty string as an argument', assert => {
  resetStubsAndSpies()

  let thunderJS = ThunderJS(options)

  thunderJS.call('WebKitBrowser', 'userscripts', '')

  assert.ok(
    makeBodySpy.returned(
      sinon.match({
        jsonrpc: '2.0',
        id: 1,
        method: 'WebKitBrowser.1.userscripts',
        params: '',
      })
    ),
    'Should make a jsonrpc body and method WebKitBrowser.1.userscripts and params'
  )

  assert.end()
})
@nunofaria
Copy link
Contributor

@dzubitskyi I have a branch on my fork that attempts to address this issue - https://github.com/nunofaria/ThunderJS/tree/36-falsy-param-support - feel free to comment on the fix attempt, thanks

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

No branches or pull requests

2 participants