@0xcert/utils
Version:
General utility module with common helper functions.
29 lines • 729 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
const spec_1 = require("@hayspec/spec");
const __1 = require("../..");
const spec = new spec_1.Spec();
spec.test('transforms an object to tuple', (ctx) => {
const res = __1.toTuple({
foo: 'FOO',
bar: ['BAR1', 'BAR2'],
baz: {
bazfoo: [1, 2],
bazbar: 'BAZBAR',
},
zed: [
{
zedfoo: [1, 2],
zedbar: 'BAZBAR',
},
],
});
ctx.deepEqual(res, [
'FOO',
['BAR1', 'BAR2'],
[[1, 2], 'BAZBAR'],
[[[1, 2], 'BAZBAR']],
]);
});
exports.default = spec;
//# sourceMappingURL=to-tuple.test.js.map
;