test(marshal): Make test output less noisy
MODIFY
packages/marshal/test/test-marshal-capdata.js
packages/marshal/test/test-marshal-capdata.js
@@ -161,9 +161,14 @@ export const roundTripPairs = harden([
],
]);
-const makeTestMarshal = () =>
+/**
+ * @param {import('../src/types.js').MakeMarshalOptions} [opts]
+ */
+const makeTestMarshal = (opts = { errorTagging: 'off' }) =>
makeMarshal(undefined, undefined, {
serializeBodyFormat: 'capdata',
+ marshalSaveError: _err => {},
+ ...opts,
});
test('serialize unserialize round trip pairs', t => {
@@ -219,7 +224,7 @@ test('unserialize static data', t => {
});
test('serialize errors', t => {
- const m = makeTestMarshal();
+ const m = makeTestMarshal({ errorTagging: 'on' });
const ser = val => m.serialize(val);
t.deepEqual(ser(harden(Error())), {
@@ -307,6 +312,7 @@ test('records', t => {
convertValToSlot,
convertSlotToVal,
{
+ errorTagging: 'off',
serializeBodyFormat: 'capdata',
},
);
@@ -398,6 +404,7 @@ test('capdata proto problems', t => {
convertValToSlot,
convertSlotToVal,
{
+ errorTagging: 'off',
serializeBodyFormat: 'capdata',
},
);

MODIFY
packages/marshal/test/test-marshal-smallcaps.js
packages/marshal/test/test-marshal-smallcaps.js
@@ -13,10 +13,14 @@ const { freeze, isFrozen, create, prototype: objectPrototype } = Object;
// this only includes the tests that do not use liveSlots
-const makeTestMarshal = () =>
+/**
+ * @param {import('../src/types.js').MakeMarshalOptions} [opts]
+ */
+const makeTestMarshal = (opts = { errorTagging: 'off' }) =>
makeMarshal(undefined, undefined, {
- errorTagging: 'off',
serializeBodyFormat: 'smallcaps',
+ marshalSaveError: _err => {},
+ ...opts,
});
test('smallcaps serialize unserialize round trip half pairs', t => {
@@ -414,6 +418,7 @@ test('smallcaps proto problems', t => {
convertValToSlot,
convertSlotToVal,
{
+ errorTagging: 'off',
serializeBodyFormat: 'smallcaps',
},
);

test(marshal): Make test output less noisy