Skip to content

Example project showcasing the setup of a golden master test. It was created as a simplified howto for my hhjs (JavaScript usergroup of Hamburg) talk. It uses typescript and relies on nock for http recording.

License

Notifications You must be signed in to change notification settings

k0pernikus/golden-master-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golden Master Test with Nock example

About

Code example for my hhjs talk about generating Golden Master Test with the help of nock.

The example uses the json-placeholder-api, it fetches each post and creates a csv file containing the id and tile. The example is a bit contrived and simplistic to focus on the golden master test setup.

Requirements

  • node8
  • yarn

The project is written in typescript. The generated js files will be in the ./dist folder, and the src folder contains the actual project.

Getting started

yarn install && yarn tsc

Entrypoint

yarn task --help

and follow the description.

Running as a golden master test case

yarn goldenMasterTest

Csv file

You will find the csv file at:

./out/data.csv

About

Example project showcasing the setup of a golden master test. It was created as a simplified howto for my hhjs (JavaScript usergroup of Hamburg) talk. It uses typescript and relies on nock for http recording.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published