5am-code / laravel-notion-api

Effortless Notion integrations with Laravel
https://notionforlaravel.com
MIT License
410 stars 50 forks source link

Snapshot and Fake Tests Later #128

Closed johguentner closed 1 year ago

johguentner commented 1 year ago

With the help of the PestHttpRecorder::class and HttpRecorder::class, all external requests (done with the Http Facade) during testing, will be intercepted, saved as snapshot and faked for the same requests for future tests.

This is increases the validity of all snapshots, which fake requests during testing (important for fast tests and testing within CI).

If new tests are written, the snapshots will we generated locally automatically. After breaking changes of the Notion API, the generation of the snapshots can be forced, to keep validity of tests at a high level.

what-the-diff[bot] commented 1 year ago