You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
נקודה פסיק
This commit is contained in:
@@ -7,8 +7,8 @@ describe('COMMAND DOCS', () => {
|
|||||||
|
|
||||||
it('transformArguments', () => {
|
it('transformArguments', () => {
|
||||||
assert.deepEqual(
|
assert.deepEqual(
|
||||||
transformArguments('SORT'),
|
transformArguments('sort'),
|
||||||
['COMMAND', 'DOCS', 'SORT']
|
['COMMAND', 'DOCS', 'sort']
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -35,13 +35,5 @@ describe('COMMAND DOCS', () => {
|
|||||||
if (item.subCommands) assert.equal(typeof item.subCommands, 'object');
|
if (item.subCommands) assert.equal(typeof item.subCommands, 'object');
|
||||||
}
|
}
|
||||||
|
|
||||||
// check with commands names
|
|
||||||
const specifiedDocs = await client.commandDocs('sort', 'get', 'cluster')
|
|
||||||
assert.equal(typeof specifiedDocs, 'object');
|
|
||||||
|
|
||||||
// check with non existing command
|
|
||||||
const nonExistingCommandDocs = await client.commandDocs('foo')
|
|
||||||
assert.equal(typeof specifiedDocs, 'object');
|
|
||||||
|
|
||||||
}, GLOBAL.SERVERS.OPEN);
|
}, GLOBAL.SERVERS.OPEN);
|
||||||
});
|
});
|
||||||
|
@@ -53,7 +53,7 @@ export function transformReply(rawReply: Array<any>): CommandDocsReply {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createDocumentationInterface(rawDocumentation: Array<any>): Doc {
|
function createDocumentationInterface(rawDocumentation: Array<any>): Doc {
|
||||||
const doc:Doc = {}
|
const doc:Doc = {};
|
||||||
|
|
||||||
for (let j = 0; j < rawDocumentation.length; j++) {
|
for (let j = 0; j < rawDocumentation.length; j++) {
|
||||||
switch (rawDocumentation[j++]) {
|
switch (rawDocumentation[j++]) {
|
||||||
@@ -70,7 +70,7 @@ function createDocumentationInterface(rawDocumentation: Array<any>): Doc {
|
|||||||
doc['complexity'] = rawDocumentation[j];
|
doc['complexity'] = rawDocumentation[j];
|
||||||
break;
|
break;
|
||||||
case 'history':
|
case 'history':
|
||||||
const historyArray = []
|
const historyArray = [];
|
||||||
for (let k = 0; k < rawDocumentation[j].length; k++) {
|
for (let k = 0; k < rawDocumentation[j].length; k++) {
|
||||||
historyArray.push({
|
historyArray.push({
|
||||||
version: rawDocumentation[j][k][0],
|
version: rawDocumentation[j][k][0],
|
||||||
@@ -92,12 +92,12 @@ function createDocumentationInterface(rawDocumentation: Array<any>): Doc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createArgumentsDocumentation(rawDocumentation: Array<any>): ArgumentsDocsReply {
|
function createArgumentsDocumentation(rawDocumentation: Array<any>): ArgumentsDocsReply {
|
||||||
const doc:ArgumentsDocsReply = {}
|
const doc:ArgumentsDocsReply = {};
|
||||||
|
|
||||||
for (let k = 0; k < rawDocumentation.length; k++) {
|
for (let k = 0; k < rawDocumentation.length; k++) {
|
||||||
let argumentName = "";
|
let argumentName = "";
|
||||||
const argumentData:ArgumentsDoc = {};
|
const argumentData:ArgumentsDoc = {};
|
||||||
|
|
||||||
for (let l = 0; l < rawDocumentation[k].length; l++) {
|
for (let l = 0; l < rawDocumentation[k].length; l++) {
|
||||||
switch (rawDocumentation[k][l++]) {
|
switch (rawDocumentation[k][l++]) {
|
||||||
case 'name':
|
case 'name':
|
||||||
|
Reference in New Issue
Block a user