fix(semibook): use tickPriceHelper #671
Test Report ✅
❌ coverage-tests-report.json
610 tests were completed in 170s with 593 passed, 17 failed and 0 skipped.
✅ test/integration/cleaner.integration.test.ts
Cleaner integration tests suite
✅ clean asks book, offer is successfully taken, therefore cannot clean it
✅ clean failing offers collects bounty
✅ clean using different takers funds
✅ clean via callStatic for failing offers returns bounty
✅ test/integration/kandel.integration.test.ts
Kandel integration tests suite farm
✅ getKandels retrieves aave kandel instances
✅ getKandels retrieves all base kandel instances using olKey
✅ getKandels retrieves all kandel instances
✅ getKandels retrieves all market kandel instances using offerList
✅ getKandels retrieves non-aave kandel instances
✅ getKandels retrieves owned kandel instances
Kandel integration tests suite instance onAave=false
✅ approve approves(full=false) tokens for deposit base=1 quote=undefined
✅ approve approves(full=false) tokens for deposit base=3 quote=4
✅ approve approves(full=false) tokens for deposit base=undefined quote=2
✅ approve approves(full=false) tokens for deposit base=undefined quote=undefined
✅ approve approves(full=true) tokens for deposit base=1 quote=undefined
✅ approve approves(full=true) tokens for deposit base=3 quote=4
✅ approve approves(full=true) tokens for deposit base=undefined quote=2
✅ approve approves(full=true) tokens for deposit base=undefined quote=undefined
✅ approve does not approve if already approved
✅ calculateMinimumDistribution can be deployed with a factor of 1
✅ calculateMinimumDistribution cannot be deployed with factor=0.5 or gasreq=undefined
✅ calculateMinimumDistribution cannot be deployed with factor=undefined or gasreq=-100000
✅ getMinimumVolume agrees with seeder on asks
✅ getMinimumVolume agrees with seeder on bids
✅ has expected immutable data from chain
✅ populateChunks can populate some offers inChunks=false
✅ populateChunks can populate some offers inChunks=true
✅ retractAndWithdraw can withdraw all offers and amounts inChunks=false
✅ retractAndWithdraw can withdraw all offers and amounts inChunks=true
✅ retractAndWithdraw can withdraw expected offers and amounts to other address
✅ retractOffers can withdraw all offers inChunks=false
✅ retractOffers can withdraw all offers inChunks=true
✅ retractOffers can withdraw select offers inChunks=false
✅ retractOffers can withdraw select offers inChunks=true
Kandel integration tests suite instance onAave=true
✅ approve approves(full=false) tokens for deposit base=1 quote=undefined
✅ approve approves(full=false) tokens for deposit base=3 quote=4
✅ approve approves(full=false) tokens for deposit base=undefined quote=2
✅ approve approves(full=false) tokens for deposit base=undefined quote=undefined
✅ approve approves(full=true) tokens for deposit base=1 quote=undefined
✅ approve approves(full=true) tokens for deposit base=3 quote=4
✅ approve approves(full=true) tokens for deposit base=undefined quote=2
✅ approve approves(full=true) tokens for deposit base=undefined quote=undefined
✅ approve does not approve if already approved
✅ calculateMinimumDistribution can be deployed with a factor of 1
✅ calculateMinimumDistribution cannot be deployed with factor=0.5 or gasreq=undefined
✅ calculateMinimumDistribution cannot be deployed with factor=undefined or gasreq=-100000
✅ getMinimumVolume agrees with seeder on asks
✅ getMinimumVolume agrees with seeder on bids
✅ has expected immutable data from chain
✅ populateChunks can populate some offers inChunks=false
✅ populateChunks can populate some offers inChunks=true
✅ retractAndWithdraw can withdraw all offers and amounts inChunks=false
✅ retractAndWithdraw can withdraw all offers and amounts inChunks=true
✅ retractAndWithdraw can withdraw expected offers and amounts to other address
✅ retractOffers can withdraw all offers inChunks=false
✅ retractOffers can withdraw all offers inChunks=true
✅ retractOffers can withdraw select offers inChunks=false
✅ retractOffers can withdraw select offers inChunks=true
Kandel integration tests suite instance router-agnostic
✅ calculateDistributionWithUniformlyChangedVolume creates new distribution with decreased volumes for all live offers
✅ calculateUniformDistributionFromMinPrice can heal multiple offers
✅ calculateUniformDistributionFromMinPrice with 0 available throws
✅ can go through life-cycle with numbers as Bigish
✅ can set gasprice
✅ can set gasreq
✅ createDistributionWithOffers can be used to heal an offer
✅ deposit can deposit to Kandel
✅ fundOnMangrove adds funds
✅ getLockedProvisionFromOffers gets the locked provision
✅ getMinimumVolumeForIndex for ask and bid
✅ getMissingProvisionFromOffers gets the additional needed provision for a higher gasprice
✅ getMissingProvisionFromOffers gets the additional needed provision for a larger distribution
✅ getOfferStatuses retrieves status
✅ getOfferStatuses retrieves status
✅ getRequiredProvision can get provision for gaspriceFactor=3 gasprice=2000 gasreq=42000
✅ getRequiredProvision can get provision for gaspriceFactor=undefined gasprice=undefined gasreq=undefined
✅ getRequiredProvision can get provision with overrides
✅ pending, volume, reserve correct after populate with deposit
✅ pending, volume, reserve correct after populate without deposit
✅ populate can be called with non-1 stepSize
✅ populate can be with new distribution
✅ populate populates a market, deposits and sets parameters inChunks=false
✅ populate populates a market, deposits and sets parameters inChunks=true
✅ populate throws if offset parameters do not match
✅ populate throws if pricePoints parameters do not match
✅ populate throws if ratio parameters do not match
✅ withdraw can withdraw all amounts
✅ withdraw can withdraw specific amounts to recipient
Kandel integration tests suite seeder
✅ minimumVolume uses config and calculates correct value offerType=asks onAave=false
✅ minimumVolume uses config and calculates correct value offerType=asks onAave=true
✅ minimumVolume uses config and calculates correct value offerType=bids onAave=false
✅ minimumVolume uses config and calculates correct value offerType=bids onAave=true
✅ sow deploys kandel and returns instance onAave:false liquiditySharing:false
✅ sow deploys kandel and returns instance onAave:false liquiditySharing:true
✅ sow deploys kandel and returns instance onAave:true liquiditySharing:false
✅ sow deploys kandel and returns instance onAave:true liquiditySharing:true
✅ sow deploys kandel with overridden gasprice for provision calculation
✅ test/integration/kandelLib.integration.test.ts
KandelLib integration test suite
✅ same exception on both askGives and bidGives undefined
✅ stub agrees with static calls - test 001
✅ stub agrees with static calls - test 002
✅ stub agrees with static calls - test 003
✅ stub agrees with static calls - test 004
✅ stub agrees with static calls - test 005
✅ stub agrees with static calls - test 006
✅ stub agrees with static calls - test 007
✅ stub agrees with static calls - test 008
✅ stub agrees with static calls - test 009
✅ stub agrees with static calls - test 010
✅ stub agrees with static calls - test 011
✅ stub agrees with static calls - test 012
✅ stub agrees with static calls - test 013
✅ stub agrees with static calls - test 014
✅ stub agrees with static calls - test 015
✅ stub agrees with static calls - test 016
✅ stub agrees with static calls - test 017
✅ stub agrees with static calls - test 018
✅ stub agrees with static calls - test 019
✅ stub agrees with static calls - test 020
✅ stub agrees with static calls - test 021
✅ stub agrees with static calls - test 022
✅ stub agrees with static calls - test 023
✅ stub agrees with static calls - test 024
✅ stub agrees with static calls - test 025
✅ stub agrees with static calls - test 026
✅ stub agrees with static calls - test 027
✅ stub agrees with static calls - test 028
✅ stub agrees with static calls - test 029
✅ stub agrees with static calls - test 030
✅ stub agrees with static calls - test 031
✅ test/integration/mangrove.integration.test.ts
Mangrove integration tests suite calculateOLKeyHash
✅ agrees with hash generated by events
Mangrove integration tests suite getMarkets
✅ gets correct market info and updates with cashness
✅ has reverse lookup of address
✅ updates with mgvReader
Mangrove integration tests suite node utils
✅ can deal a test token
✅ test/integration/mangroveToyENS.integration.test.ts
Mangrove functionality watch local addresses
✅ can start watching after ToyENS has been created
✅ can start watching before ToyENS has been created
❌ test/integration/market.integration.test.ts
Market integration tests suite
✅ buying uses best price, with forceRoutingToMangroveOrder:false
✅ buying uses best price, with no forceRoutingToMangroveOrder
❌ crudely simulates market buy
estimatedVolume should be ~0.5, got 5.00031836763155e-13
✅ get minimum volume
✅ getOfferProvision agrees with calculateOfferProvision for asks with gasprice=10000
✅ getOfferProvision agrees with calculateOfferProvision for asks with gasprice=undefined
✅ getOfferProvision agrees with calculateOfferProvision for bids with gasprice=10000
✅ getOfferProvision agrees with calculateOfferProvision for bids with gasprice=undefined
✅ gets config
✅ gets OB
✅ max gasreq is added to gas estimates
✅ max gasreq returns a BigNumber, even if the book is empty
✅ mgvIntegrationTestUtils can post offers for asks
✅ mgvIntegrationTestUtils can post offers for bids
✅ returns correct data when taking offers
✅ selling uses best price
✅ subscribes
✅ updates OB
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=42 and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=42 and gasLimit=undefined
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=7000000 and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=7000000 and gasLimit=undefined
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=undefined and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=false with gasLowerBound=undefined and gasLimit=undefined
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=42 and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=42 and gasLimit=undefined
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=7000000 and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=7000000 and gasLimit=undefined
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=undefined and gasLimit=6500000
✅ uses expected gasLimit and forceRoutingToMangroveOrder=true with gasLowerBound=undefined and gasLimit=undefined
Market integration tests suite estimateVolumeTest
✅ return estimate value for buy
✅ return estimate value for sell
✅ return estimate value for sell
Market integration tests suite getMissingProvision
✅ can miss some provision
Market integration tests suite getOutboundInbound
✅ returns base as inbound and quote as outbound, when bids
✅ returns base as outbound and quote as inbound, when asks
✅ returns this.base as inbound and this.quote as outbound, when bids
✅ returns this.base as outbound and this.quote as inbound, when asks
Market integration tests suite isActive
✅ returns false, when asks and bids both not active
✅ returns false, when asks is active and bids is not active
✅ returns false, when asks is not active and bids is active
✅ returns true, when asks and bids are active
Market integration tests suite isLive
✅ returns false, when gives is less than 1
✅ returns true, when gives is positive
Market integration tests suite offerInfo
✅ return offer from ba semi book
✅ returns asks offer info
✅ returns bids offer info
Market integration tests suite Readonly mode
✅ can read book updates in readonly mode
✅ test/integration/mgvtoken.integration.test.ts
MGV Token integration tests suite
✅ allowanceInfinite is false if allowance is 2^200
✅ allowanceInfinite is true if allowance is 2^200 + 1
✅ allowanceInfinite is true if infinite allowance
✅ approve can be set to 0
✅ approve sets approved amount
✅ approveIfHigher sets when higher but not when lower
✅ approveIfNotInfinite creates approval TX only if finite
✅ converts
✅ get token from address
✅ has checksum addresses
✅ increaseApproval increases except when at max
✅ reads allowance and sets
✅ test/integration/offermaker.integration.test.ts
OfferMaker integration test suite
✅ checks allowance for EOA provider
✅ checks allowance for onchain logic
✅ checks provision for EOA provider
✅ checks provision for onchain logic
✅ checks provision for onchain logic by calling provisionOf
✅ gets missing provision for eoa logic
✅ gets missing provision for onchain logic
OfferMaker integration test suite After setup
✅ approves signer for base transfer
✅ cancels offer
✅ fails, when trying to cancel a non-existing offer
✅ fails, when trying to create an offer on a closed market
✅ fails, when trying to push new offer without sufficient provision
✅ fails, when trying to update on a closed market
✅ OfferMaker updates offer
✅ pushes a new offer
✅ withdraws
✅ test/integration/restingOrder.integration.test.ts
RestingOrder Resting order integration tests suite
✅ no resting order params, with forceRoutingToMangroveOrder:true
✅ no resting order params, with forceRoutingToMangroveOrder:true
✅ resting order with deadline and custom gasreq
✅ resting order, using existing offer
✅ simple resting order, with forceRoutingToMangroveOrder:false
✅ simple resting order, with forceRoutingToMangroveOrder:true
✅ simple resting order, with no forceRoutingToMangroveOrder
RestingOrder RestingOrder connectivity
✅ deploys and connects
❌ test/integration/semibook.integration.test.ts
Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - cache tests
✅ returns all given as residue when cache and offer list is empty
❌ returns correct estimate and residue when cache is empty and offer list is not
estimatedVolume should be 1
❌ returns correct estimate and residue when cache is partial and insufficient while offer list is sufficient
estimatedVolume should be 2
❌ returns correct estimate and residue when cache is partial and offer list is insufficient
estimatedVolume should be 2
Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - calculation tests
❌ estimates all available volume when offer list has 1 offer with insufficient volume
estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645062749301084175220145764815970169871357786650634125180658884346485137939453125
❌ estimates all available volume when offer list has multiple offers with insufficient volume
estimatedVolume should be 5, but is 4999634701954.4084645665024833089643083990316786882116940830438179410247664603100150172536320081206895338254980742931365966796875
❌ estimates volume and no residue when offer list has 1 offer with sufficient volume
estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645063
❌ estimates volume and no residue when offer list has multiple offers which together have sufficient volume
estimatedVolume should be 4
✅ returns zero when given is zero
Semibook integration tests suite estimateVolume estimateVolume({to: sell}) - cache tests
✅ returns all given as residue when cache and offer list is empty
❌ returns correct estimate and residue when cache is empty and offer list is not
estimatedVolume should be 1
❌ returns correct estimate and residue when cache is partial and insufficient while offer list is sufficient
estimatedVolume should be 2
❌ returns correct estimate and residue when cache is partial and offer list is insufficient
estimatedVolume should be 2
Semibook integration tests suite estimateVolume estimateVolume({to: sell}) - calculation tests
❌ estimates all available volume when offer list has 1 offer with insufficient volume
estimatedVolume should be 1
❌ estimates all available volume when offer list has multiple offers with insufficient volume
tick should be 10986
❌ estimates volume and no residue when offer list has 1 offer with sufficient volume
estimatedVolume should be 1
❌ estimates volume and no residue when offer list has multiple offers which together have sufficient volume
estimatedVolume should be 1.5
✅ returns zero when given is zero
Semibook integration tests suite getBestInCache
✅ returns offer id 1, because cache gets synced even though market is created before offer
✅ returns offer id 1, because market made after offer
Semibook integration tests suite getConfig
✅ returns the config of a block as Mangrove.LocalConfig, when given blocknumber
✅ returns the config of a block, when given blocknumber
✅ returns the config of the latest block as Mangrove.LocalConfig, when given no blocknumber
✅ returns the config of the latest block as Mangrove.RawConfig, when given no blocknumber
Semibook integration tests suite getMaxGasReq
✅ finds max gasreq on both asks and bids side of market
✅ returns `undefined` when the semibook is empty
Semibook integration tests suite getMinimumVolume
✅ gets 1 unit if density is 0
✅ gets minimum volume
Semibook integration tests suite initialization options Option.desiredPrice
✅ does not fail if offer list is empty
✅ fetches all offers if all have a better price
✅ fetches only one chunk if no offers have a better price
✅ stops fetching when a chunk with a worse price has been fetched
Semibook integration tests suite initialization options Option.desiredVolume {to: buy}
✅ does not fail if offer list is empty
✅ fetches all offers if offer list has insufficient volume
✅ fetches only one chunk if it has sufficient volume
✅ stops fetching when sufficient volume has been fetched
Semibook integration tests suite initialization options Option.desiredVolume {to: sell}
✅ does not fail if offer list is empty
❌ fetches all offers if offer list has insufficient volume
expected 1 to equal 2
✅ fetches only one chunk if it has sufficient volume
❌ stops fetching when sufficient volume has been fetched
expected 1 to equal 4
Semibook integration tests suite offerInfo
✅ returns offer from cache, when offer is in cache
✅ returns offer from cache, when offer is in cache
✅ returns offer from contract, when offer is not in cache
✅ returns offer from contract, when offer is not in cache
✅ test/unit/configuration.unit.test.ts
Configuration unit tests suite
✅ Adding token config does not affect existing config
✅ Can add token config of unknown token
✅ can read mangroveOrder config
✅ Reset of configuration reverts additions and changes
✅ test/unit/densityLib.unit.test.ts
Density unit test suite
✅ test_density_convert_auto
✅ test_density_manual
✅ test_density_multiply_auto
✅ test_multiply_manual
✅ test_paramsTo96X32
✅ test/unit/kandelConfiguration.unit.test.ts
KandelConfiguration unit tests suite getConfigForBaseQuote
✅ inherits and overrides for market
✅ parses all expected valid
✅ throws on missing config 0 - aaveEnabled is not configured for pair TokenA/FailingConfig0 on network configTest.
✅ throws on missing config 1 - minimumBasePerOfferFactor is not configured for pair TokenA/FailingConfig1 on network configTest.
✅ throws on missing config 2 - minimumQuotePerOfferFactor is not configured for pair TokenA/FailingConfig2 on network configTest.
✅ throws on missing config 3 - stepSize is not configured for pair TokenA/FailingConfig3 on network configTest.
✅ throws on missing config 4 - baseQuoteTickOffset is not configured for pair TokenA/FailingConfig4 on network configTest.
KandelConfiguration unit tests suite getConfiguredMarketsForNetwork
✅ configTest
✅ maticmum
✅ unknown
KandelConfiguration unit tests suite getMostSpecificConfig
✅ does not fail on missing base
✅ does not fail on missing network
✅ does not fail on missing properties
✅ does not fail on missing quote
✅ test/unit/kandelDistribution.unit.test.ts
KandelDistribution unit tests suite calculateConstantGivesPerOffer
✅ can calculate constant outbound
✅ can work without any available
✅ throws if 0 available
KandelDistribution unit tests suite chunkDistribution
✅ can chunk an even set
✅ can chunk an uneven set
✅ can have one extra offer due to boundary
✅ works with all asks
✅ works with all bids
KandelDistribution unit tests suite getFirstLiveAskIndex
✅ is correct when no live asks
✅ is correct when some live asks
KandelDistribution unit tests suite getGeometricParams
✅ can calculate the geometric params
KandelDistribution unit tests suite getOfferedVolumeForDistribution
✅ sums up the base and quote volume of the distribution
KandelDistribution unit tests suite getPriceRatio
✅ agrees with helper's calculator for baseQuoteTickOffset=1
✅ agrees with helper's calculator for baseQuoteTickOffset=6931
✅ agrees with helper's calculator for baseQuoteTickOffset=789
✅ test/unit/kandelDistributionGenerator.unit.test.ts
KandelDistributionGenerator unit tests suite calculateDistribution
✅ calculates expected price points when generating generateFromMid=false
✅ calculates expected price points when generating generateFromMid=true
✅ can calculate distribution with constant base generateFromMid=false
✅ can calculate distribution with constant base generateFromMid=true
✅ can calculate distribution with constant outbound
✅ can calculate distribution with constant quote
✅ can calculate distribution with fixed base/quote constantBase=false volume which follows geometric distribution
✅ can calculate distribution with fixed base/quote constantBase=true volume which follows geometric distribution
✅ throws on missing initials
KandelDistributionGenerator unit tests suite calculateDistribution calculateDistribution
✅ can calculate distribution with fixed base volume and fixed quote volume which follows geometric price distribution
✅ can calculate distribution with only asks
✅ can calculate distribution with only bids
✅ rounds off base and gives according to decimals
KandelDistributionGenerator unit tests suite calculateFirstOfferIndexAndFirstAskIndex
✅ calculates the right value for fromMid=0 min=1 mid=-10 offset=1 pricePoints=10
✅ calculates the right value for fromMid=0 min=2 mid=10 offset=1 pricePoints=2
✅ calculates the right value for fromMid=0 min=2 mid=2 offset=1 pricePoints=10
✅ calculates the right value for fromMid=0 min=2 mid=6 offset=1 pricePoints=10
✅ calculates the right value for fromMid=0 min=2 mid=6 offset=1 pricePoints=3
✅ calculates the right value for fromMid=0 min=2 mid=6 offset=1 pricePoints=4
✅ calculates the right value for fromMid=0 min=2 mid=7 offset=3 pricePoints=10
✅ calculates the right value for fromMid=1 min=1 mid=-10 offset=1 pricePoints=10
✅ calculates the right value for fromMid=1 min=2 mid=2 offset=1 pricePoints=10
✅ calculates the right value for fromMid=1 min=2 mid=6 offset=1 pricePoints=10
✅ calculates the right value for fromMid=1 min=2 mid=6 offset=1 pricePoints=3
✅ calculates the right value for fromMid=1 min=2 mid=6 offset=1 pricePoints=4
✅ calculates the right value for fromMid=1 min=2 mid=7 offset=3 pricePoints=10
KandelDistributionGenerator unit tests suite calculateGeometricDistributionParams
✅ generateFromMid=false has firstAskIndex higher than max has no asks
✅ generateFromMid=false has firstAskIndex higher than max has no asks
✅ midPrice higher than max has no asks
✅ midPrice higher than max has no asks generateFromMid=false
✅ midPrice higher than max has no asks generateFromMid=true
✅ passes on TickDistributionParams and calculated values
KandelDistributionGenerator unit tests suite calculateMinimumDistribution
✅ can have constant base
✅ can have constant gives
✅ can have constant quote
✅ throws if both constant
KandelDistributionGenerator unit tests suite getMinimumVolumeForIndex
✅ also can use dual to calculate minimum asks 0.01 100
✅ also can use dual to calculate minimum asks 0.1 100
✅ also can use dual to calculate minimum bids 0.01 100
✅ also can use dual to calculate minimum bids 0.1 100
KandelDistributionGenerator unit tests suite recalculateDistributionFromAvailable
✅ can set new constant base
✅ can set new constant gives
✅ can set new constant quote
KandelDistributionGenerator unit tests suite uniformlyChangeVolume
✅ respects minimums
✅ test/unit/kandelDistributionHelper.unit.test.ts
KandelDistributionHelper unit tests suite calculateBaseQuoteTickOffset
✅ can calculate based on price ratio
✅ Fails if less than 1
KandelDistributionHelper unit tests suite calculateMinimumInitialGives
✅ returns higher than minimum if dual at some price would be below its minimum
✅ returns minimum if no prices affect it
✅ returns minimum on empty lists
KandelDistributionHelper unit tests suite chunkIndices
✅ can chunk
KandelDistributionHelper unit tests suite chunkIndicesAroundMiddle
✅ can chunk an even set
✅ can chunk an uneven set with middle=2
✅ can chunk an uneven set with middle=undefined
✅ works with middle=0
✅ works with middle=4
KandelDistributionHelper unit tests suite getBaseQuoteTicksFromTick
✅ can get baseQuoteTicks from tick
KandelDistributionHelper unit tests suite getTickDistributionParams
✅ calculates sames parameters for all combinations of minPrice, maxPrice, ratio, and pricePoints, and the similar tick-based parameters
✅ can get 2 pricePoints from minPrice and maxPrice
✅ fails if neither midBaseQuoteTick nor midPrice is given
✅ throws error if not enough parameters are given
✅ throws error if only 1 price point
✅ throws if max too high
✅ throws if min too low
✅ throws if min/max too close
KandelDistributionHelper unit tests suite sortByIndex
✅ sorts
KandelDistributionHelper unit tests suite uniformlyChangeVolume
✅ can decrease uniformly, respects limits, prices, and rounding
✅ can increase and decrease also a single one baseDelta=-2 quoteDelta=undefined
✅ can increase and decrease also a single one baseDelta=2 quoteDelta=-2000
✅ can increase and decrease also a single one baseDelta=2 quoteDelta=2000
✅ can increase and decrease also a single one baseDelta=undefined quoteDelta=-2000
KandelDistributionHelper unit tests suite uniformlyDecrease
✅ can decrease but not total amount if limits prevent
✅ can decrease total amount if available, but respect limits
✅ can decrease uniformly if all sufficiently above limit
✅ can round result
✅ does not go beyond limit due to rounding up
KandelDistributionHelper unit tests suite uniformlyIncrease
✅ can increase uniformly
✅ can round result
✅ test/unit/kandelStatus.unit.test.ts
KandelStatus unit tests suite getIndexOfPriceClosestToMid
✅ gets closest to mid on multiple
✅ gets offer if single
KandelStatus unit tests suite getOfferStatuses
✅ discards outliers even though price is near mid
✅ gets all as expected for initial distribution
✅ gets price and status with dead and crossed offers
✅ gets status with 1 dead near mid with stepSize=1 where dual is not dead
✅ gets status with 2 dead near mid with stepSize=1 where dual is dead
✅ gets status with 3 dead near mid with stepSize=2 where dual is dead for some
✅ gets status with 4 dead near mid with stepSize=2 where dual is dead
✅ test/unit/liquidityProvider.unit.test.ts
Liquidity provider unit tests suite
✅ normalizeOfferParams, ask tick = 0 price = 10 different decimals
✅ normalizeOfferParams, ask tick = 0 price = 10 different decimals
✅ normalizeOfferParams, ask tick = 0 same decimals
✅ normalizeOfferParams, ask with tick = -1 different decimals
✅ normalizeOfferParams, ask with tick = -1 different decimals
✅ normalizeOfferParams, ask with tick = -1 same decimals
✅ normalizeOfferParams, ask with tick = -1 same decimals
✅ normalizeOfferParams, ask with tick = 1 different decimals
✅ normalizeOfferParams, ask with tick = 1 different decimals
✅ normalizeOfferParams, ask with tick = 1 same decimals
✅ normalizeOfferParams, ask with tick = 1 same decimals
✅ normalizeOfferParams, bid tick = 0 different decimals
✅ normalizeOfferParams, bid tick = 0 same decimals
✅ normalizeOfferParams, with big gives and wants, as asks
✅ normalizeOfferParams, with gives and wants, as asks
✅ normalizeOfferParams, with gives and wants, as bids
✅ normalizeOfferParams, with gives, tick, asks and funding
✅ normalizeOfferParams, with gives, tick, bids and no funding
✅ normalizeOfferParams, with non-equal decimals gives, tick, bids and no funding
✅ normalizeOfferParams, with volume and price 1, as asks
✅ normalizeOfferParams, with volume and price 1, as bids
✅ normalizeOfferParams, with volume and price 2, as asks
✅ normalizeOfferParams, with volume and price 2, as asks
✅ normalizeOfferParams, with volume and price 2, as bids
✅ normalizeOfferParams, with volume and price 2, as bids
✅ test/unit/market.unit.test.ts
Market unit tests suite getBaseQuoteVolumes
✅ returns gives as baseVolume and wants as quoteVolume
✅ returns gives as quoteVolume and wants as baseVolume
Market unit tests suite getDisplayDecimalsForPriceDifferences
✅ returns 7 decimals when difference is 1e-7
✅ returns 7 decimals when difference is 9e-7
✅ returns 7 decimals when difference is 9e-7
✅ returns no decimals for empty list
✅ returns no decimals for list with offers with same price
✅ returns no decimals for list with one offer
✅ returns no decimals when price differences are integers
✅ returns one decimal when difference is -0.1
✅ returns one decimal when difference is -0.9999999
✅ returns one decimal when difference is 0.1
✅ returns one decimal when difference is 0.9999999
✅ returns the decimals for the first difference when that is smallest
✅ returns the decimals for the last difference when that is smallest
Market unit tests suite getGivesForPrice
✅ returns wants divided by price
✅ returns wants multiplied by price
Market unit tests suite getGivesWantsForVolumeAtPrice
✅ return gives = volume && wants = volume*price for undefined type
✅ return gives = volume*price && wants = volume for undefined type
Market unit tests suite getWantsForPrice
✅ returns gives multiplied by price
✅ returns wants divided by price
✅ test/unit/prettyPrint.unit.test.ts
PrettyPrint Unit test suite consoleOffers
✅ should use default filter
✅ should use given filter
PrettyPrint Unit test suite prettyPrint
✅ prints the offers using the given filter
✅ test/unit/semibook.unit.test.ts
Semibook unit test suite getIsVolumeDesiredForAsks
✅ returns false, when desiredVolume is undefined
✅ returns false, when what is base and to is sell
✅ returns false, when what is quote and to is buy
✅ returns true, when what is base and to is buy
✅ returns true, when what is quote and to is sell
Semibook unit test suite getIsVolumeDesiredForBids
✅ returns false, when desiredVolume is undefined
✅ returns false, when what is base and to is buy
✅ returns false, when what is quote and to is sell
✅ returns true, when what is base and to is sell
✅ returns true, when what is quote and to is buy
Semibook unit test suite getOfferFromCacheOrFail
✅ returns offer when offer is in cache
✅ throws error when offer is not in cache
Semibook unit test suite insertOffer
✅ inserting offer exceeds maxOffer size, offer is not worst offer
✅ inserting offer exceeds maxOffer size, offer is worst offer
✅ inserts offer in empty book
✅ inserts offer in non empty book, offer is at a better tick, tick already exist
✅ inserts offer in non empty book, offer is at worse tick, tick already exist
✅ inserts offer in non empty book, offer is better
✅ inserts offer in non empty book, offer is in the middle
✅ inserts offer in non empty book, offer is in the middle at an already existing tick
✅ inserts offer in non empty book, offer is worse
Semibook unit test suite removeOffer
✅ removes last offer in book
✅ removes offer from empty book
✅ removes offer from non empty book, offer is best offer, does not have others at same tick
✅ removes offer from non empty book, offer is best offer, has others at same tick
✅ removes offer from non empty book, offer is worst offer, has others at same tick
✅ removes offer from non empty book, offer is worst offer, has others at same tick
✅ test/unit/tickLib.unit.test.ts
TickLib unit test suite divExpUp
✅ a==0 then rem == 0, should return (a >> e) + rem
✅ e<256 and a > 0
✅ e>255 then rem == 1, should return (a >> e) + rem
TickLib unit test suite floatLt
✅ returns false when exp_a < exp_b
✅ returns false when exp_a == exp_b and mantissa_a >= mantissa_b
✅ returns true when exp_a == exp_b and mantissa_a < mantissa_b
✅ returns true when exp_a > exp_b and mantissa_a < mantissa_b
TickLib unit test suite getTickFromPrice
✅ should return the correct tick for price, MAX_TICK
TickLib unit test suite inboundFromOutbound
✅ should return the correct value of inbound from outbound based on tick
TickLib unit test suite inboundFromOutboundUp
✅ should return the correct rounded up value of inbound from outbound based on tick
TickLib unit test suite inRange
✅ should return false if tick is outside the range
✅ should return true if tick is within the range
TickLib unit test suite nonNormalizedPriceFromTick
✅ Test with maximum tick
✅ Test with minimum tick
✅ Test with negative tick
✅ Test with positive tick
✅ Test with tick exceeding MAX_TICK
TickLib unit test suite normalizePrice
✅ should handle negative shift correctly
✅ should handle positive shift correctly
✅ should throw an error if exp is less than 0 after normalization
✅ should throw an error if mantissa is zero
TickLib unit test suite outboundFromInbound
✅ should return the correct value of outbound from inbound based on tick
TickLib unit test suite outboundFromInboundUp
✅ should return the correct rounded up value of outbound from inbound based on tick
TickLib unit test suite priceFromTick
✅ should return the correct price for tick, 0
✅ should return the correct price for tick, 1
✅ should return the correct price for tick, MAX_TICK
✅ should return the correct price for tick, MIN_TICK
TickLib unit test suite priceFromVolumes
✅ should return the correct mantissa and exp for non-zero inboundAmt and outboundAmt
✅ should return the correct mantissa and exp when inboundAmt is 0
✅ should return the correct mantissa and exp when outboundAmt is 0
TickLib unit test suite priceToMantissaAndExponent
✅ should return the correct mantissa and exponent for price, MAX_TICK
✅ should return the correct mantissa and exponent for price, MIN_TICK
✅ should return the correct mantissa and exponent for price, tick = -1
✅ should return the correct mantissa and exponent for price, tick = -1000
✅ should return the correct mantissa and exponent for price, tick = 0
✅ should return the correct mantissa and exponent for price, tick = 1
✅ should return the correct mantissa and exponent for price, tick = 1000
TickLib unit test suite ratioFromTick
✅ test_ratioFromTick
TickLib unit test suite tickFromNormalizedPrice
✅ should return the correct tick for normalizedPrice
✅ should revert with mgv/tickFromRatio/tooHigh
✅ should revert with mgv/tickFromRatio/tooLow
TickLib unit test suite tickFromRatio
✅ should return the correct tick for price
TickLib unit test suite tickFromVolumes
✅ should return tick
✅ test/unit/tickPriceHelper.unit.test.ts
TickPriceHelper unit tests suite
✅ manual calculation
✅ manual calculation inverse decimals
TickPriceHelper unit tests suite inboundFromOutbound
✅ inboundFromOutbound ba=asks base=1 quote=2 price=2
✅ inboundFromOutbound ba=asks base=1 quote=2 price=2
✅ inboundFromOutbound ba=asks base=2 quote=1 price=0.5
✅ inboundFromOutbound ba=asks base=2 quote=1 price=0.5
✅ inboundFromOutbound ba=asks base=6 quote=3 price=0.5
✅ inboundFromOutbound ba=asks base=6 quote=3 price=0.5
✅ inboundFromOutbound ba=bids base=1 quote=2 price=2
✅ inboundFromOutbound ba=bids base=1 quote=2 price=2
✅ inboundFromOutbound ba=bids base=2 quote=1 price=0.5
✅ inboundFromOutbound ba=bids base=2 quote=1 price=0.5
✅ inboundFromOutbound ba=bids base=6 quote=3 price=0.5
✅ inboundFromOutbound ba=bids base=6 quote=3 price=0.5
✅ outboundFromInbound ba=asks base=1 quote=2 price=2
✅ outboundFromInbound ba=asks base=1 quote=2 price=2
✅ outboundFromInbound ba=asks base=2 quote=1 price=0.5
✅ outboundFromInbound ba=asks base=2 quote=1 price=0.5
✅ outboundFromInbound ba=asks base=6 quote=3 price=0.5
✅ outboundFromInbound ba=asks base=6 quote=3 price=0.5
✅ outboundFromInbound ba=bids base=1 quote=2 price=2
✅ outboundFromInbound ba=bids base=1 quote=2 price=2
✅ outboundFromInbound ba=bids base=2 quote=1 price=0.5
✅ outboundFromInbound ba=bids base=2 quote=1 price=0.5
✅ outboundFromInbound ba=bids base=6 quote=3 price=0.5
✅ outboundFromInbound ba=bids base=6 quote=3 price=0.5
TickPriceHelper unit tests suite priceFromTick
✅ returns price=1 for tick 0 with base decimals: 6, quote decimals: 6 (asks semibook)
✅ returns price=1 for tick 0 with base decimals: 6, quote decimals: 6 (bids semibook)
✅ returns price=1.00000396574 for tick 414486 with base decimals: 18, quote decimals: 0 (bids semibook)
✅ returns price=1.000096 for tick -414487 with base decimals: 0, quote decimals: 18 (bids semibook)
✅ returns price=100 for tick 0 with base decimals: 2, quote decimals: 0 (asks semibook)
✅ returns price=100 for tick 0 with base decimals: 2, quote decimals: 0 (bids semibook)
✅ returns price=1838.53469156 for tick -75171 with base decimals: 18, quote decimals: 18 (bids semibook)
✅ returns price=1838.534691561 for tick 75171 with base decimals: 18, quote decimals: 18 (asks semibook)
✅ returns price=1e-12 for tick 0 with base decimals: 6, quote decimals: 18 (asks semibook)
✅ returns price=1e-12 for tick 0 with base decimals: 6, quote decimals: 18 (bids semibook)
TickPriceHelper unit tests suite priceFromTick is inverse of tickFromPrice (up to tick-step)
✅ returns price=1 for tickFromPrice(..., tickFromPrice(..., 1))) with base decimals: 6, quote decimals: 6 for asks semibook
✅ returns price=1 for tickFromPrice(..., tickFromPrice(..., 1))) with base decimals: 6, quote decimals: 6 for bids semibook
✅ returns price=1.00000396574 for tickFromPrice(..., tickFromPrice(..., 1.00000396574))) with base decimals: 18, quote decimals: 0 for bids semibook
✅ returns price=1.000096 for tickFromPrice(..., tickFromPrice(..., 1.000096))) with base decimals: 0, quote decimals: 18 for bids semibook
✅ returns price=100 for tickFromPrice(..., tickFromPrice(..., 100))) with base decimals: 2, quote decimals: 0 for asks semibook
✅ returns price=100 for tickFromPrice(..., tickFromPrice(..., 100))) with base decimals: 2, quote decimals: 0 for bids semibook
✅ returns price=1838.53469156 for tickFromPrice(..., tickFromPrice(..., 1838.53469156))) with base decimals: 18, quote decimals: 18 for bids semibook
✅ returns price=1838.534691561 for tickFromPrice(..., tickFromPrice(..., 1838.534691561))) with base decimals: 18, quote decimals: 18 for asks semibook
✅ returns price=1e-12 for tickFromPrice(..., tickFromPrice(..., 1e-12))) with base decimals: 6, quote decimals: 18 for asks semibook
✅ returns price=1e-12 for tickFromPrice(..., tickFromPrice(..., 1e-12))) with base decimals: 6, quote decimals: 18 for bids semibook
TickPriceHelper unit tests suite tickFromPrice
✅ returns tick=-414487 for price 1.000096 with base decimals: 0, quote decimals: 18 (bids semibook))
✅ returns tick=-75171 for price 1838.53469156 with base decimals: 18, quote decimals: 18 (bids semibook))
✅ returns tick=0 for price 1 with base decimals: 6, quote decimals: 6 (asks semibook))
✅ returns tick=0 for price 1 with base decimals: 6, quote decimals: 6 (bids semibook))
✅ returns tick=0 for price 100 with base decimals: 2, quote decimals: 0 (asks semibook))
✅ returns tick=0 for price 100 with base decimals: 2, quote decimals: 0 (bids semibook))
✅ returns tick=0 for price 1e-12 with base decimals: 6, quote decimals: 18 (asks semibook))
✅ returns tick=0 for price 1e-12 with base decimals: 6, quote decimals: 18 (bids semibook))
✅ returns tick=414486 for price 1.00000396574 with base decimals: 18, quote decimals: 0 (bids semibook))
✅ returns tick=75171 for price 1838.534691561 with base decimals: 18, quote decimals: 18 (asks semibook))
TickPriceHelper unit tests suite tickFromPrice is inverse of priceFromTick (up to tick-step)
✅ returns tick=-414487 for priceFromTick(..., priceFromTick(..., -414487))) with base decimals: 0, quote decimals: 18 for bids semibook
✅ returns tick=-75171 for priceFromTick(..., priceFromTick(..., -75171))) with base decimals: 18, quote decimals: 18 for bids semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 2, quote decimals: 0 for asks semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 2, quote decimals: 0 for bids semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 6, quote decimals: 18 for asks semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 6, quote decimals: 18 for bids semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 6, quote decimals: 6 for asks semibook
✅ returns tick=0 for priceFromTick(..., priceFromTick(..., 0))) with base decimals: 6, quote decimals: 6 for bids semibook
✅ returns tick=414486 for priceFromTick(..., priceFromTick(..., 414486))) with base decimals: 18, quote decimals: 0 for bids semibook
✅ returns tick=75171 for priceFromTick(..., priceFromTick(..., 75171))) with base decimals: 18, quote decimals: 18 for asks semibook
TickPriceHelper unit tests suite tickFromVolumes
✅ returns tick=0 for inboundVolume=1, outboundVolume=1 with base decimals: 6, quote decimals: 6 (asks semibook)
✅ returns tick=0 for inboundVolume=1, outboundVolume=1 with base decimals: 6, quote decimals: 6 (bids semibook)
✅ test/unit/trade.unit.test.ts
Trade unit tests suite comparePrices
✅ returns false, when price = referencePrice and compare is “gt“
✅ returns false, when price = referencePrice and compare is “lt“
✅ returns false, when price > referencePrice and compare is “gt“
✅ returns false, when price > referencePrice and compare is “lt“
✅ returns true, when price < referencePrice and compare is “gt“
✅ returns true, when price < referencePrice and compare is “lt“
Trade unit tests suite getParamsForBuy
✅ returns fillVolume as fillVolume, tick as tick and fillWants as fillWants, when params has tick, fillVolume and fillWants
✅ returns fillVolume as fillVolume, tick as tick and fillWants as true, when params has fillVolume and tick, but no fillWants
✅ returns fillVolume as gives, tick as TickLib.fromVolume(gives,wants) and fillWants as fillWants, when params has gives, wants and fillWants
✅ returns fillVolume as total, tick as tick(price) and fillWants false, when params has price!=null and total
✅ returns fillVolume as volume, tick as -1*tick(price) and fillWants true, when params has price!=null and volume
Trade unit tests suite getParamsForSell
✅ returns fillVolume as fillVolume, tick as tick and fillWants false, when params has wants and gives, but no fillWants
✅ returns fillVolume as gives, tick as TickLib.fromVolume(gives,wants) and fillWants as fillWants, when params has gives, wants and fillWants
✅ returns fillVolume as total, tick as tick(price) and fillWants true, when params has price!=null and total
✅ returns fillVolume as volume, tick as tick(price) and fillWants false, when params has price!=null and volume
✅ returns wants as wants, gives as gives and fillWants as fillWants, when params has wants, gives and fillWants
Trade unit tests suite isPriceBetter
✅ Uses “gt“ when ba = bids
✅ Uses “lt“ when ba = asks
Trade unit tests suite isPriceWorse
✅ Uses “gt“ when ba = bids
✅ Uses “lt“ when ba = asks
Trade unit tests suite validateSlippage
✅ return given slippage, when it is valid
✅ returns 0, when slippage is undefined
✅ throw error, when slippage is above 100
✅ throw error, when slippage is lower than 0
✅ test/unit/tradeEventManagement.unit.test.ts
TradeEventManagement unit tests suite createPosthookFailure
✅ returns posthookFailure object, always
TradeEventManagement unit tests suite createSuccess
✅ returns Success object, always
TradeEventManagement unit tests suite createSummary
✅ return summary with partialFill as true, when partialFill func returns true
TradeEventManagement unit tests suite createSummaryForOrderComplete
✅ returns createSummary, always
TradeEventManagement unit tests suite createSummaryForOrderSummary
✅ returns createSummary with offerId, always
TradeEventManagement unit tests suite createTradeFailure
✅ returns TradeFailure object, always
TradeEventManagement unit tests suite rawOfferToOffer
✅ returns offer with correct values for asks
✅ returns offer with correct values for bids
✅ test/unit/unitCalculations.unit.test.ts
UnitCalculations unit tests suite fromUnits
✅ returns Big number, amount is BigNumber and nameOrDecimal is number
✅ returns Big number, amount is number and nameOrDecimal is number
✅ returns Big number, amount is number and nameOrDecimal is string
✅ returns Big number, amount is string and nameOrDecimal is number
Annotations
Check failure on line 1193 in test/integration/market.integration.test.ts
github-actions / Test Report
test/integration/market.integration.test.ts ► Market integration tests suite ► crudely simulates market buy
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be ~0.5, got 5.00031836763155e-13
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be ~0.5, got 5.00031836763155e-13
at Context.<anonymous> (test/integration/market.integration.test.ts:1193:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 448 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - cache tests ► returns correct estimate and residue when cache is empty and offer list is not
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 1
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 1
at Context.<anonymous> (test/integration/semibook.integration.test.ts:448:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 485 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - cache tests ► returns correct estimate and residue when cache is partial and insufficient while offer list is sufficient
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2
at Context.<anonymous> (test/integration/semibook.integration.test.ts:485:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 521 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - cache tests ► returns correct estimate and residue when cache is partial and offer list is insufficient
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2
at Context.<anonymous> (test/integration/semibook.integration.test.ts:521:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 593 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - calculation tests ► estimates all available volume when offer list has 1 offer with insufficient volume
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645062749301084175220145764815970169871357786650634125180658884346485137939453125
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645062749301084175220145764815970169871357786650634125180658884346485137939453125
at Context.<anonymous> (test/integration/semibook.integration.test.ts:593:16)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 635 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - calculation tests ► estimates all available volume when offer list has multiple offers with insufficient volume
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 5, but is 4999634701954.4084645665024833089643083990316786882116940830438179410247664603100150172536320081206895338254980742931365966796875
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 5, but is 4999634701954.4084645665024833089643083990316786882116940830438179410247664603100150172536320081206895338254980742931365966796875
at Context.<anonymous> (test/integration/semibook.integration.test.ts:635:16)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 670 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - calculation tests ► estimates volume and no residue when offer list has 1 offer with sufficient volume
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645063
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2, but is 1999836340196.9276293205811817467828017922856686645063
at Context.<anonymous> (test/integration/semibook.integration.test.ts:670:16)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 712 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: buy}) - calculation tests ► estimates volume and no residue when offer list has multiple offers which together have sufficient volume
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 4
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 4
at Context.<anonymous> (test/integration/semibook.integration.test.ts:712:16)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 448 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: sell}) - cache tests ► returns correct estimate and residue when cache is empty and offer list is not
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 1
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 1
at Context.<anonymous> (test/integration/semibook.integration.test.ts:448:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 485 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: sell}) - cache tests ► returns correct estimate and residue when cache is partial and insufficient while offer list is sufficient
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2
at Context.<anonymous> (test/integration/semibook.integration.test.ts:485:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Check failure on line 521 in test/integration/semibook.integration.test.ts
github-actions / Test Report
test/integration/semibook.integration.test.ts ► Semibook integration tests suite estimateVolume estimateVolume({to: sell}) - cache tests ► returns correct estimate and residue when cache is partial and offer list is insufficient
Failed test found in:
coverage-tests-report.json
Error:
estimatedVolume should be 2
Raw output
AssertionError [ERR_ASSERTION]: estimatedVolume should be 2
at Context.<anonymous> (test/integration/semibook.integration.test.ts:521:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)