it('success', async () => { const schema1 = await schemaCreate() const data1 = await schema1.serialize() const schema2 = await Schema.deserialize(data1) assert.equal(schema2.sourceId, schema1.sourceId) const data2 = await schema2.serialize() assert.deepEqual(data1, data2) })
it('success', async () => { const schema = await schemaCreate() const serialized = await schema.serialize() assert.ok(serialized) assert.property(serialized, 'version') assert.property(serialized, 'data') const { data, version } = serialized assert.ok(data) assert.ok(version) assert.equal(data.source_id, schema.sourceId) })
it('success', async () => { await schemaCreate() })
it('success', async () => { const schema = await schemaCreate() const paymentTxn = await schema.paymentManager.getPaymentTxn() validatePaymentTxn(paymentTxn) })
it('exists', async () => { const schema = await schemaCreate() assert.instanceOf(schema.paymentManager, SchemaPaymentManager) assert.equal(schema.paymentManager.handle, schema.handle) })