Back to directory
Use-Tusk avatar
Use-Tusk / drift-node-sdk

drift-node-sdk

Node.js SDK for capturing and replaying API calls made to/from your service

173

Stars

6

Forks

1

Watchers

Apache-2.0

License

Tusk Drift Banner

npm version License: Apache 2.0 GitHub last commit Tusk X account Tusk Community Slack

The Node.js Tusk Drift SDK enables fast and deterministic API testing by capturing and replaying API calls made to/from your service. Automatically record real-world API calls, then replay them as tests using the Tusk CLI to find regressions. During replay, all outbound requests are intercepted with recorded data to ensure consistent behavior without side-effects.

Documentation

For comprehensive guides and API reference, visit our full documentation.

SDK Guides

Tusk Drift Animated Diagram Tusk Drift Animated Diagram

Requirements

Tusk Drift currently supports the following packages and versions:

If you're using packages or versions not listed above, please create an issue with the package + version you'd like an instrumentation for.

Installation

Step 1: Install the CLI

First, install and configure the Tusk Drift CLI by following our CLI installation guide. The CLI helps set up your Tusk configuration file and replays tests.

The wizard will eventually direct you back here when it's time to set up the SDK.

Step 2: Install the SDK

After completing the CLI wizard, install the SDK:

npm install @use-tusk/drift-node-sdk

Step 3: Initialize the SDK for your service

Refer to our initialization guide to set up the SDK for your service.

Step 4: Run Your First Test

Follow along our quick start guide to record and replay your first test!

Troubleshooting

Having issues?

Community

Join our open source community on Slack.

Contributing

We appreciate feedback and contributions. See CONTRIBUTING.md.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Releases

What's Changed

docs(codereview): add logging level rules by @sohil-kshirsagar in #158 fix(coverage): use dynamic import for ast-v8-to-istanbul to fix tsx by @sohil-kshirsagar in #159

Full Changelog:...

What's Changed

feat: ability to toggle log transitions for adaptive sampling rate by @jy-tan in #157

Full Changelog: v0.1.43...v0.1.44

What's Changed

feat: add adaptive sampling to node sdk by @jy-tan in #155 CoverBot: Covered core analytics and ESM loader utilities by @tusk-dev[bot] in #153 perf: async span export to prevent event...

What's Changed

fix(coverage): expand multi-line statements to all lines by @sohil-kshirsagar in #154

Full Changelog: v0.1.41...v0.1.42

What's Changed

feat(coverage): replace acorn with @babel/parser for JS and TS support by @sohil-kshirsagar in #152

Full Changelog: v0.1.40...v0.1.41