ccxt-rest
Version:
Open Source Unified REST API of 100+ Crypto Exchange Sites
553 lines • 29.7 kB
JSON
{
"stats": {
"suites": 8,
"tests": 18,
"passes": 18,
"pending": 0,
"failures": 0,
"start": "2020-06-21T18:10:11.635Z",
"end": "2020-06-21T18:10:12.400Z",
"duration": 765,
"testsRegistered": 18,
"passPercent": 100,
"pendingPercent": 0,
"other": 0,
"hasOther": false,
"skipped": 0,
"hasSkipped": false,
"passPercentClass": "success",
"pendingPercentClass": "danger"
},
"suites": {
"uuid": "9db8eb71-d809-4130-9bcb-deddf9275593",
"title": "",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "b8ac1871-d27f-46df-8f6c-e6f1cc4ec365",
"title": "> controllers",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [
{
"title": "\"before all\" hook",
"fullTitle": "> controllers \"before all\" hook",
"timedOut": false,
"duration": 535,
"pass": false,
"fail": false,
"pending": false,
"code": "if (fs.existsSync('./out/database.sqlite3')) {\n fs.unlinkSync('./out/database.sqlite3')\n}\nreturn new Promise((resolve) => {\n ccxtServer.start(_server => {\n server = _server\n resolve();\n }) \n})",
"err": {},
"isRoot": false,
"uuid": "7e5f99e5-7faa-44ff-a8b3-d0daa5037ccf",
"isHook": true,
"skipped": false
}
],
"afterHooks": [
{
"title": "\"after all\" hook",
"fullTitle": "> controllers \"after all\" hook",
"timedOut": false,
"duration": 0,
"pass": false,
"fail": false,
"pending": false,
"code": "if (server) {\n server.close()\n}\nif (fs.existsSync('./out/database.sqlite3')) {\n fs.unlinkSync('./out/database.sqlite3')\n}",
"err": {},
"isRoot": false,
"uuid": "f7f5402c-00b3-4335-ae4b-7860c24cb542",
"isHook": true,
"skipped": false
}
],
"tests": [],
"suites": [
{
"uuid": "fd6218b1-a876-46f5-a928-39808d6dea2b",
"title": "> exchanges",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "58368bfd-c645-4bbf-803c-75ef93946f8d",
"title": "> GET /exchanges",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "> should return list of exchanges",
"fullTitle": "> controllers > exchanges > GET /exchanges > should return list of exchanges",
"timedOut": false,
"duration": 30,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .get('/exchanges')\n .expect('Content-Type', /json/)\n .expect(200)\n .end(function(err, res) {\n should.not.exist(err);\n res.body.should.eql(exchangeConfig.exchanges.map(i => '' + i));\n done();\n });",
"err": {},
"isRoot": false,
"uuid": "81a0d011-4239-4455-a0da-b08fe7d13c35",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"81a0d011-4239-4455-a0da-b08fe7d13c35"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 30,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": false,
"rootEmpty": false,
"_timeout": 2000
},
{
"uuid": "ba3c62b7-de12-410f-a5a2-f35ec7b139b6",
"title": "> exchange",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "8eae38be-b59e-4c8e-9fa0-38badcf7016f",
"title": "> Given unsupported exchange name",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "60401f33-8a70-4f07-902e-f531f3ed979f",
"title": "> [Unsupported Exchange name] Exchange Management API",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "> GET:/exchange/nonExistentExchangeName then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange name] Exchange Management API > GET:/exchange/nonExistentExchangeName then return 404",
"timedOut": false,
"duration": 14,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .get('/exchange/nonExistentExchangeName')\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "57d70ca2-eef2-4afa-9e0d-f2bc4cb5c833",
"isHook": false,
"skipped": false
},
{
"title": "> POST:/exchange/nonExistentExchangeName then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange name] Exchange Management API > POST:/exchange/nonExistentExchangeName then return 404",
"timedOut": false,
"duration": 22,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .post('/exchange/nonExistentExchangeName')\n .send({id:'nonExistentExchangeName1'})\n .set('Accept', 'application/json')\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "d1bd3b6f-d83c-4fcf-8c19-82265ecf12d6",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"57d70ca2-eef2-4afa-9e0d-f2bc4cb5c833",
"d1bd3b6f-d83c-4fcf-8c19-82265ecf12d6"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 36,
"root": false,
"rootEmpty": false,
"_timeout": 2000
},
{
"uuid": "7e99c5dd-74af-41fa-a104-1edbf95d8b4f",
"title": "> [Unsupported Exchange Name] Public Data API",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "> GET:/exchange/nonExistentExchangeName/markets then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/markets then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .get('/exchange/nonExistentExchangeName/markets')\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "1d4a9a7c-7d8e-4ea1-89fe-9ca4487c57aa",
"isHook": false,
"skipped": false
},
{
"title": "> GET:/exchange/nonExistentExchangeName/orderBook then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/orderBook then return 404",
"timedOut": false,
"duration": 10,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS);\nrequest(server)\n .get('/exchange/nonExistentExchangeName/orderBook')\n .query({ symbol: 'BTC/ETH' })\n .set('Accept', 'application/json')\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "54d3662a-4e8c-42e3-9ed6-07895c34cf89",
"isHook": false,
"skipped": false
},
{
"title": "> GET:/exchange/nonExistentExchangeName/l2OrderBook then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/l2OrderBook then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS);\nrequest(server)\n .get('/exchange/nonExistentExchangeName/l2OrderBook')\n .query({ symbol: 'BTC/ETH' })\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "ad4c427d-fa0c-421d-83ec-17948b141e0b",
"isHook": false,
"skipped": false
},
{
"title": "> GET:/exchange/nonExistentExchangeName/trades then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/trades then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/trades')\n .query({ symbol: 'BTC/ETH' })\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "d92563e2-35fd-42ac-a425-07c0fe10b131",
"isHook": false,
"skipped": false
},
{
"title": "> GET:/exchange/nonExistentExchangeName/ticker then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/ticker then return 404",
"timedOut": false,
"duration": 7,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/ticker')\n .query({ symbol: 'BTC/ETH' })\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "2aae1374-57e7-4567-bbda-8c75a520d086",
"isHook": false,
"skipped": false
},
{
"title": "> GET:/exchange/nonExistentExchangeName/tickers then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > GET:/exchange/nonExistentExchangeName/tickers then return 404",
"timedOut": false,
"duration": 7,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/tickers')\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "2e46df87-c289-4c07-b902-cf8888edd21f",
"isHook": false,
"skipped": false
},
{
"title": "> POST:/exchange/nonExistentExchangeName/_/loadMarkets then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Public Data API > POST:/exchange/nonExistentExchangeName/_/loadMarkets then return 404",
"timedOut": false,
"duration": 8,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .post('/exchange/nonExistentExchangeName/_/loadMarkets')\n .type('text')\n .send(JSON.stringify([true]))\n .set('Accept', 'application/json')\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "0e6fbf7f-5ca8-478d-a388-e6055e54e748",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"1d4a9a7c-7d8e-4ea1-89fe-9ca4487c57aa",
"54d3662a-4e8c-42e3-9ed6-07895c34cf89",
"ad4c427d-fa0c-421d-83ec-17948b141e0b",
"d92563e2-35fd-42ac-a425-07c0fe10b131",
"2aae1374-57e7-4567-bbda-8c75a520d086",
"2e46df87-c289-4c07-b902-cf8888edd21f",
"0e6fbf7f-5ca8-478d-a388-e6055e54e748"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 50,
"root": false,
"rootEmpty": false,
"_timeout": 2000
},
{
"uuid": "3de01d22-e8ea-428e-8691-fbfed2b6a94e",
"title": "> [Unsupported Exchange Name] Private Data APIs",
"fullFile": "/home/travis/build/ccxt-rest/ccxt-rest/test/api/controllers/exchange.js",
"file": "/test/api/controllers/exchange.js",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "> GET:/exchange/nonExistentExchangeName/balances then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > GET:/exchange/nonExistentExchangeName/balances then return 404",
"timedOut": false,
"duration": 5,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/balances')\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "191910a9-23b8-471f-822d-42e1013dc929",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Place order then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Place order then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .post('/exchange/nonExistentExchangeName/order')\n .send({ symbol: 'BTC/ETH', type: 'limit', side: 'buy', amount:0, price:0 })\n .set('Accept', 'application/json')\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "0f57ca63-54df-4bb0-a0e8-996c00c16770",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Cancel order then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Cancel order then return 404",
"timedOut": false,
"duration": 11,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "request(server)\n .delete('/exchange/nonExistentExchangeName/order/dummy')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "fb431d32-e5a9-4587-af05-5539bc407e42",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Get order then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Get order then return 404",
"timedOut": false,
"duration": 14,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/order/dummy')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "744ce32c-6c7f-4f91-a950-49225f60c66f",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Get orders then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Get orders then return 404",
"timedOut": false,
"duration": 15,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/orders')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "06182686-28b5-4708-9416-41d0707256e0",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Get open orders then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Get open orders then return 404",
"timedOut": false,
"duration": 14,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/orders/open')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "076bf631-500b-4fb7-99c3-b258ca1fad1f",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Get closed orders then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Get closed orders then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/orders/closed')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "149474ab-609d-4e53-a62e-9b6d4dbc23de",
"isHook": false,
"skipped": false
},
{
"title": "> [Unsupported Exchange Name] Get my trades then return 404",
"fullTitle": "> controllers > exchange > Given unsupported exchange name > [Unsupported Exchange Name] Private Data APIs > [Unsupported Exchange Name] Get my trades then return 404",
"timedOut": false,
"duration": 6,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "this.timeout(TIMEOUT_MS)\nrequest(server)\n .get('/exchange/nonExistentExchangeName/trades/mine')\n .query({symbol : 'BTC/ETH'})\n .expect('Content-Type', /json/)\n .expect(404)\n .end((err, res) => {\n should.not.exist(err);\n done();\n })",
"err": {},
"isRoot": false,
"uuid": "1bdcdf47-8275-4141-8a98-928b6dd09982",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"191910a9-23b8-471f-822d-42e1013dc929",
"0f57ca63-54df-4bb0-a0e8-996c00c16770",
"fb431d32-e5a9-4587-af05-5539bc407e42",
"744ce32c-6c7f-4f91-a950-49225f60c66f",
"06182686-28b5-4708-9416-41d0707256e0",
"076bf631-500b-4fb7-99c3-b258ca1fad1f",
"149474ab-609d-4e53-a62e-9b6d4dbc23de",
"1bdcdf47-8275-4141-8a98-928b6dd09982"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 77,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": true,
"rootEmpty": true,
"_timeout": 2000
},
"copyrightYear": 2020
}