How to use the cozy-client.prototype function in cozy-client

To help you get started, we’ve selected a few cozy-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cozy / cozy.github.io / en / cozy-banks / src / ducks / notifications / services.spec.js View on Github external
beforeEach(() => {
    jest
      .spyOn(CozyClient.prototype, 'query')
      .mockReturnValue({ data: [{ _id: 'group-id-1', label: 'My group' }] })
    jest
      .spyOn(BankAccount, 'getAll')
      .mockReturnValue([
        { _id: 'c0ffeedeadbeef', label: 'My bank account', balance: 123 }
      ])
  })