Socket
Socket
Sign inDemoInstall

@zendesk/laika

Package Overview
Dependencies
38
Maintainers
15
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @zendesk/laika

Test, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!


Version published
Weekly downloads
20K
decreased by-5.7%
Maintainers
15
Install size
1.73 MB
Created
Weekly downloads
 

Readme

Source

Laika logo

Try Laika on CodeSandbox

Test, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!

Read the Medium article about Laika: Mock GraphQL Subscriptions with Laika — the only Apollo Client mocking tool you’ll need

Example recording output

Features

  • mock responses in either unit tests or browser tests (think Puppeteer or Cypress)
    • simulate error state
    • simulate loading state
    • simulate subscriptions (pushing data to the client at any given point)
  • it can work in production code without affecting the size of the bundle (laika is lazily loaded)
  • captures the variables that were called for a given operation for assertions
  • log all the data passing through from the network (or whatever Links are after this one)
  • record your user story
  • generate fixtures and working mock code for use in your tests
  • modify backend responses before they reach your components (e.g. to fuzz-test unexpected behavior)

Usage

Alternatives

Contribution

Thanks for your interest in our tool! Community involvement helps make our design system fresh and tasty for everyone.

Got issues with what you find here? Please feel free to create an issue.

If you'd like to take a crack at making some changes, please follow our contributing documentation for details needed to submit a PR.

Community behavior is benevolently ruled by a code of conduct. Please participate accordingly.

License

Copyright 2021 Zendesk

Licensed under the Apache License, Version 2.0

Keywords

FAQs

Last updated on 30 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc