diff options
-rw-r--r-- | packages/json-schemas/test/schema_test.ts | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index 119c13388..7b090ad87 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -626,20 +626,34 @@ describe('Schema', () => { it('should validate valid order book responses', () => { const testCases = [ { - bids: [], - asks: [], - }, - { - bids: [signedOrder, signedOrder], - asks: [], + bids: { + ...paginatedResponse, + records: [relayerApiOrder], + }, + asks: { + ...paginatedResponse, + records: [], + }, }, { - bids: [], - asks: [signedOrder, signedOrder], + bids: { + ...paginatedResponse, + records: [relayerApiOrder, relayerApiOrder], + }, + asks: { + ...paginatedResponse, + records: [relayerApiOrder, relayerApiOrder], + }, }, { - bids: [signedOrder], - asks: [signedOrder, signedOrder], + bids: { + ...paginatedResponse, + records: [], + }, + asks: { + ...paginatedResponse, + records: [relayerApiOrder, relayerApiOrder], + }, }, ]; validateAgainstSchema(testCases, relayerApiOrderBookResponseSchema); @@ -648,18 +662,29 @@ describe('Schema', () => { const testCases = [ {}, { - bids: [signedOrder, signedOrder], - }, - { - asks: [signedOrder, signedOrder], + bids: { + records: [relayerApiOrder], + }, + asks: { + ...paginatedResponse, + records: [], + }, }, { - bids: signedOrder, - asks: [signedOrder, signedOrder], + bids: { + ...paginatedResponse, + records: [relayerApiOrder, relayerApiOrder], + }, + asks: {}, }, { - bids: [signedOrder], - asks: signedOrder, + bids: { + ...paginatedResponse, + }, + asks: { + ...paginatedResponse, + records: [relayerApiOrder, relayerApiOrder], + }, }, ]; const shouldFail = true; |