(spdyDict)
| 135 | } |
| 136 | |
| 137 | function deflateRawResetDictionaryTest(spdyDict) { |
| 138 | let doneReset = false; |
| 139 | let output = ''; |
| 140 | const deflate = zlib.createDeflateRaw({ dictionary: spdyDict }); |
| 141 | const inflate = zlib.createInflateRaw({ dictionary: spdyDict }); |
| 142 | inflate.setEncoding('utf-8'); |
| 143 | |
| 144 | deflate.on('data', function(chunk) { |
| 145 | if (doneReset) |
| 146 | inflate.write(chunk); |
| 147 | }); |
| 148 | |
| 149 | inflate.on('data', function(chunk) { |
| 150 | output += chunk; |
| 151 | }); |
| 152 | |
| 153 | deflate.on('end', function() { |
| 154 | inflate.end(); |
| 155 | }); |
| 156 | |
| 157 | inflate.on('end', common.mustCall(function() { |
| 158 | assert.strictEqual(input, output); |
| 159 | })); |
| 160 | |
| 161 | deflate.write(input); |
| 162 | deflate.flush(function() { |
| 163 | deflate.reset(); |
| 164 | doneReset = true; |
| 165 | deflate.write(input); |
| 166 | deflate.end(); |
| 167 | }); |
| 168 | } |
| 169 | |
| 170 | for (const dict of [spdyDict, ...common.getBufferSources(spdyDict)]) { |
| 171 | basicDictionaryTest(dict); |
no test coverage detected
searching dependent graphs…