import 'package:angel_framework/angel_framework.dart'; import 'package:angel_html/angel_html.dart'; import 'package:angel_test/angel_test.dart'; import 'package:html_builder/elements.dart'; import 'package:html_builder/html_builder.dart'; import 'package:test/test.dart'; main() { Angel app; TestClient client; setUp(() async { app = new Angel(); app.fallback(renderHtml()); app.get('/html', (req, res) { return html(c: [ head(c: [ title(c: [text('ok')]) ]) ]); }); app.get( '/strict', chain([ renderHtml( enforceAcceptHeader: true, renderer: new StringRenderer( doctype: null, pretty: false, ), ), (req, res) { return div(c: [text('strict')]); }, ]), ); client = await connectTo(app); }); tearDown(() => client.close()); test('sets content type and body', () async { var response = await client.get('/html'); print('Response: ${response.body}'); expect( response, allOf( hasContentType('text/html'), hasBody( '