test: write tests for sugar functions (#1631)

* test: write tests for sugar functions
This commit is contained in:
Mukul Jangid
2021-09-23 16:04:58 -04:00
committed by Mayukha Vadari
parent 98c9b9bc14
commit f2216446e5
8 changed files with 275 additions and 338 deletions

View File

@@ -66,7 +66,7 @@ export default function createMockRippled(port: number): MockedWebSocketServer {
throw new Error(`Request has no id: ${requestJSON}`)
}
if (request.command == null) {
throw new Error(`Request has no id: ${requestJSON}`)
throw new Error(`Request has no command: ${requestJSON}`)
}
if (request.command === 'ping') {
ping(conn, request)