1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
* init

* implement graph commands

* add graph to packages table

* fix ts.infoDebug

* fix redisearch tests

* Update INFO_DEBUG.ts

* fix INFO.spec.ts

* test QUERY and SLOWLOG

Co-authored-by: Avital-Fine <avital.fine@redis.com>
This commit is contained in:
Leibale Eidelman
2022-01-31 12:52:19 -05:00
committed by GitHub
parent 46b831c922
commit 3547b20293
46 changed files with 563 additions and 39 deletions

View File

@@ -340,7 +340,7 @@ describe('CREATE', () => {
testUtils.testWithClient('client.ft.create', async client => {
assert.equal(
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT // TODO: shouldn't be mandatory
field: SchemaFieldTypes.TEXT
}),
'OK'
);

View File

@@ -22,7 +22,7 @@ describe('DROPINDEX', () => {
testUtils.testWithClient('client.ft.dropIndex', async client => {
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT // TODO: shouldn't be mandatory
field: SchemaFieldTypes.TEXT
});
assert.equal(

View File

@@ -1,4 +1,5 @@
import { strict as assert } from 'assert';
import { SchemaFieldTypes } from '.';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './INFO';
@@ -11,8 +12,8 @@ describe('INFO', () => {
});
testUtils.testWithClient('client.ft.info', async client => {
await client.ft.create('index', {}, {
ON: 'HASH' // TODO: shouldn't be mandatory
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT
});
assert.deepEqual(
@@ -25,7 +26,16 @@ describe('INFO', () => {
keyType: 'HASH',
prefixes: ['']
},
attributes: [],
attributes: [[
'identifier',
'field',
'attribute',
'field',
'type',
'TEXT',
'WEIGHT',
'1'
]],
numDocs: '0',
maxDocId: '0',
numTerms: '0',

View File

@@ -1,6 +1,7 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './SYNDUMP';
import { SchemaFieldTypes } from '.';
describe('SYNDUMP', () => {
it('transformArguments', () => {
@@ -11,8 +12,8 @@ describe('SYNDUMP', () => {
});
testUtils.testWithClient('client.ft.synDump', async client => {
await client.ft.create('index', {}, {
ON: 'HASH' // TODO: shouldn't be mandatory
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT
});
assert.deepEqual(

View File

@@ -1,6 +1,7 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { transformArguments } from './SYNUPDATE';
import { SchemaFieldTypes } from '.';
describe('SYNUPDATE', () => {
describe('transformArguments', () => {
@@ -27,8 +28,8 @@ describe('SYNUPDATE', () => {
});
testUtils.testWithClient('client.ft.synUpdate', async client => {
await client.ft.create('index', {}, {
ON: 'HASH' // TODO: shouldn't be mandatory
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT
});
assert.equal(