spookie 1.0.2+3 copy "spookie: ^1.0.2+3" to clipboard
spookie: ^1.0.2+3 copied to clipboard

SuperAgent driven library for testing Dart HTTP servers.

example/spookie_example.dart

import 'dart:io';

import 'package:pharaoh/pharaoh.dart';
import 'package:spookie/spookie.dart';

void main() async {
  final app = Pharaoh();

  app.get('/', (req, res) {
    return res
        .type(ContentType.parse('application/vnd.example+json'))
        .json({"hello": "world"});
  });

  test('should not override previous Content-Types', () async {
    await (await request<Pharaoh>(app))
        .get('/')
        .expectStatus(200)
        .expectContentType('application/vnd.example+json')
        .expectBody('{"hello":"world"}')
        .test();
  });
}
2
likes
150
pub points
32%
popularity

Publisher

verified publisheryaroo.dev

SuperAgent driven library for testing Dart HTTP servers.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

http, test

More

Packages that depend on spookie