alphagov / learningtime-hh-sem1-gov-location-service

Early talent assigned learning time, Semester 1 project for Harley Harris
1 stars 1 forks source link

Install Jest/Nock #13

Open harley-harris opened 1 year ago

huwd commented 1 year ago

This is probably our focus, right? You want to do more testing with the final days?

If you're looking for ideas of what to test. I'd recommend taking a browse around: https://github.com/alphagov/gds-api-adapters/tree/main/test

perhaps especially the test suite for the base client and JSON_client.

If it's any help I stole all this code the other day for a side project I'm working on (MIT license :D) and rewrote these tests into Rspec which is very similar to Jest syntax.

These are all fundimentally good GOV.UK tests, so not really my code. But have a look at the "it" statements here and the expects. Might give some ideas for things to test for: https://github.com/huwd/api_adaptor/blob/main/spec/lib/api_adaptor/json_client_spec.rb

How will you handle those?

harley-harris commented 1 year ago

https://www.npmjs.com/package/supertest

harley-harris commented 1 year ago

https://basarat.gitbook.io/typescript/intro-1/jest

harley-harris commented 1 year ago

https://github.com/nock/nock/issues/2397