issues
search
lukepighetti
/
mastodon_dart
Unofficial 🐘 client written in 🎯
https://pub.dev/packages/mastodon_dart
MIT License
28
stars
8
forks
source link
Tests
#8
Closed
lukepighetti
closed
4 years ago
lukepighetti
commented
5 years ago
This is a big topic. The general concept seems to be:
Get a real JSON response (Postman is useful here)
Remove any personal data.
Create an HTTP Override
https://docs.flutter.io/flutter/dart-io/HttpOverrides-class.html
Mock a response to the endpoint you're testing. (JSON in a string literal?)
Call the method that hits that endpoint
Make sure the data class deserializes without errors.
Check a couple fields.
This is a big topic. The general concept seems to be: