anchor.diff:    group('events', () {
       for (final entry in allXml.entries) {
         group(entry.key, () {
  -        final document = XmlDocument.parse(entry.value);
  -        final source = document.toXmlString();
  -        final events = <XmlEvent>[];
  -        setUp(() => events
  -          ..clear()
  -          ..addAll(parseEvents(source)));
  +        late final XmlDocument document;
  +        late final String source;
  +        late final List<XmlEvent> events;
  +        setUpAll(() {
  +          document = XmlDocument.parse(entry.value);
  +          source = document.toXmlString();
  +          events = parseEvents(source).toList(growable: false);
  +        });
           chunkedTests<String>(
             'string -> events',
  -          source,
  +          () => source,
             stringChunker,
             (stream) {
               final actual = stream.toXmlEvents().normalizeEvents().flatten();
  
positive.code:         );
          chunkedTests<List<XmlNode>>(
            'nodes -> events -> nodes',
            document.children,
            listChunker,
            (stream) async {
              final actual =
  
negative.code:       );
        chunkedTests<String>(
          'not matching end tag',
          () => '<foo></bar></foo>',
          stringChunker,
          (stream) {
            expect(
  