data.forEach(d =>
        duplex.write(d, err => {
          expect(err).undefined();
          writeCb();
        }),