THRIFT-5564: Add nodejs tests to github actions (#3082)
These tests exist, but don't currently run on github actions. This adds a new job to run these.
This also fixes the regression in the tests caused by https://github.com/apache/thrift/pull/3014.
diff --git a/lib/nodejs/test/deep-constructor.test.js b/lib/nodejs/test/deep-constructor.test.js
index 504dacf..a91ddb1 100644
--- a/lib/nodejs/test/deep-constructor.test.js
+++ b/lib/nodejs/test/deep-constructor.test.js
@@ -28,7 +28,7 @@
buff = msg;
});
const prot = new thrift.TBinaryProtocol(transport);
- data.write(prot);
+ data[Symbol.for("write")](prot);
prot.flush();
return buff;
}
@@ -37,7 +37,7 @@
const t = new thrift.TFramedTransport(serialized);
const p = new thrift.TBinaryProtocol(t);
const data = new type();
- data.read(p);
+ data[Symbol.for("read")](p);
return data;
}
@@ -48,7 +48,7 @@
});
const protocol = new thrift.TJSONProtocol(transport);
protocol.writeMessageBegin("", 0, 0);
- data.write(protocol);
+ data[Symbol.for("write")](protocol);
protocol.writeMessageEnd();
protocol.flush();
return buff;
@@ -59,7 +59,7 @@
const protocol = new thrift.TJSONProtocol(transport);
protocol.readMessageBegin();
const data = new type();
- data.read(protocol);
+ data[Symbol.for("read")](protocol);
protocol.readMessageEnd();
return data;
}