Skip to content

falsy params support #36

@dzubitskyi

Description

@dzubitskyi

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()
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions