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

This commit is contained in:
ppe
2023-01-23 14:09:47 +01:00
parent 6f79c30ea8
commit 773f7c54bc
2 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "warp-contracts",
"version": "1.2.47",
"version": "1.2.48",
"description": "An implementation of the SmartWeave smart contract protocol.",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
@@ -74,11 +74,11 @@
"level": "^8.0.0",
"memory-level": "^1.0.0",
"redstone-isomorphic": "1.1.8",
"warp-wasm-metering": "1.0.0",
"safe-stable-stringify": "2.4.1",
"stream-buffers": "^3.0.2",
"unzipit": "^1.4.0",
"vm2": "3.9.11"
"vm2": "3.9.11",
"warp-wasm-metering": "1.0.0"
},
"devDependencies": {
"@types/cheerio": "^0.22.30",

View File

@@ -78,7 +78,7 @@ describe('Testing WarpGatewayContractDefinitionLoader', () => {
it('loads contract definition when cache is empty', async () => {
// Cache is empty
loader.getCache().delete(contract.txId());
expect(await loader.getCache().get({ key: contract.txId(), sortKey: 'cd'})).toBeFalsy();
expect(await loader.getCache().get({ key: contract.txId(), sortKey: 'cd' })).toBeFalsy();
// Load contract
const loaded = await loader.load(contract.txId());
@@ -86,12 +86,12 @@ describe('Testing WarpGatewayContractDefinitionLoader', () => {
expect(loaded.src).toBe(contractSrc);
// Contract is in its cache
expect(await loader.getCache().get({ key: loaded.txId, sortKey: 'cd'})).toBeTruthy();
expect(await loader.getSrcCache().get({ key: loaded.txId, sortKey: 'cd'})).toBeFalsy();
expect(await loader.getCache().get({ key: loaded.txId, sortKey: 'cd' })).toBeTruthy();
expect(await loader.getSrcCache().get({ key: loaded.txId, sortKey: 'cd' })).toBeFalsy();
// Source is in its cache
expect(await loader.getCache().get({ key: loaded.srcTxId, sortKey: 'src'})).toBeFalsy();
expect(await loader.getSrcCache().get({ key: loaded.srcTxId, sortKey: 'src'})).toBeTruthy();
expect(await loader.getCache().get({ key: loaded.srcTxId, sortKey: 'src' })).toBeFalsy();
expect(await loader.getSrcCache().get({ key: loaded.srcTxId, sortKey: 'src' })).toBeTruthy();
});
it('loads contract definition when cache contains given definition', async () => {