v1.2.1
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
ppe
2022-09-01 14:32:35 +02:00
parent 327d68a090
commit f2940e1ff8
2 changed files with 18 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.2.0",
"version": "1.2.1",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",

View File

@@ -299,20 +299,26 @@ describe('Testing internal writes', () => {
});
it('should auto throw on default settings during writeInteraction if strict', async () => {
await expect(callingContract.writeInteraction({
function: 'writeContractAutoThrow',
contractId: calleeTxId
}, {strict: true})).rejects.toThrowError(
/^Cannot create interaction: Internal write auto error for call/
);
await expect(
callingContract.writeInteraction(
{
function: 'writeContractAutoThrow',
contractId: calleeTxId
},
{ strict: true }
)
).rejects.toThrowError(/^Cannot create interaction: Internal write auto error for call/);
});
it('should not auto throw on default settings during writeInteraction if strict and IW call force to NOT throw an exception', async () => {
const {originalTxId} = await callingContract.writeInteraction({
function: 'writeContractForceNoAutoThrow',
contractId: calleeTxId
}, {strict: true});
expect(originalTxId.length).toEqual(43)
const { originalTxId } = await callingContract.writeInteraction(
{
function: 'writeContractForceNoAutoThrow',
contractId: calleeTxId
},
{ strict: true }
);
expect(originalTxId.length).toEqual(43);
});
it('should not auto throw on default settings if IW call force to NOT throw an exception', async () => {