flush.js 280 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 var parser = require(__dirname).test({ expect: [ ['opentag', {'name':'T', attributes:{}, isSelfClosing: false}], ['text', 'flush'], ['text', 'rest'], ['closetag', 'T'], ] }); parser.write('<T>flush'); parser.flush(); parser.write('rest</T>'); parser.close();