A sample API to show Neo4j usage with TypeScript, in a TDD fashion backed by Jest and Testcontainers, and with large transactions split into multiple Cypher queries (with transaction consistency).
https://github.com/jpbarbosa/neo4j-api/wiki
Determining test suites to run...
Neo4j container found at localhost:55001
PASS src/graphApi/movies.test.ts
moviesApi
✓ should create 2 movies (33 ms)
✓ should get the 2 movies previously created (12 ms)
✓ should get only The Godfather (7 ms)
✓ should update The Godfather tagline (27 ms)
✓ should add one actor and one reviewer to The Godfather (29 ms)
✓ should remove one actor and one reviewer from The Godfather (28 ms)
✓ should not create any data when an error occurs in the transaction (13 ms)
✓ should delete The Godfather (14 ms)
Test Suites: 1 passed, 1 total
Tests: 8 passed, 8 total
Snapshots: 0 total
Time: 0.933 s, estimated 1 s
Ran all test suites related to changed files.
Watch Usage: Press w to show more.
- Neo4j AuraDB free instance
- Docker Desktop installed and running (Docker knowledge not required)
- Node.js installed (v16 or higher)