Index: test/filterClasses.js |
=================================================================== |
--- a/test/filterClasses.js |
+++ b/test/filterClasses.js |
@@ -191,18 +191,17 @@ |
let filter = Filter.fromText(text); |
if (postInit) |
postInit(filter); |
let result = serializeFilter(filter); |
test.equal(result.sort().join("\n"), expected.sort().join("\n"), text); |
// Test round-trip |
let filter2; |
- let buffer = []; |
- filter.serialize(buffer); |
+ let buffer = [...filter.serialize()]; |
if (buffer.length) |
{ |
let map = Object.create(null); |
for (let line of buffer.slice(1)) |
{ |
if (/(.*?)=(.*)/.test(line)) |
map[RegExp.$1] = RegExp.$2; |
} |