August 29, 2023

How to Test HarperDB Custom Functions with Node Tap

Welcome to Community Posts
Click below to read the full article.
Summary of What to Expect
Table of Contents

In this article, Danny Adams showcases how to write some basic feature tests for a HarperDB custom functions (applications) project to ensure that the api routes are working as planned, using Node-tap. We will also write a unit test to ensure that one of our individual functions is working correctly.

  1. Installing HarperDB locally
  2. Creating a HarperDB custom functions project
  3. Setting up HarperDB Studio
  4. Creating our Schema and Table in HarperDB Studio
  5. Defining some useful constants for our project
  6. Creating our HarperDB Custom Function API routes
  7. Setting up our project for testing
  8. Testing creating a post
  9. Testing getting posts
  10. Things we could improve on in this project