Example #1
0
 it('throws: missing name', async () => {
   const { name, ...data } = dataProofCreate()
   const error = await shouldThrow(() => Proof.create(data as any))
   assert.equal(error.vcxCode, VCXCode.INVALID_OPTION)
 })
Example #2
0
 it.skip('throws: invalid attrs', async () => {
   const { attrs, ...data } = dataProofCreate()
   const error = await shouldThrow(() => Proof.create({ attrs: [ { invalid: 'invalid' } ] as any, ...data }))
   assert.equal(error.vcxCode, VCXCode.INVALID_JSON)
 })
Example #3
0
 it.skip('throws: empty attrs', async () => {
   const { attrs, ...data } = dataProofCreate()
   const error = await shouldThrow(() => Proof.create({ attrs: [], ...data }))
   assert.equal(error.vcxCode, VCXCode.INVALID_OPTION)
 })