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

fix #1714 - update README(s)

This commit is contained in:
leibale
2021-11-09 18:07:26 -05:00
parent 8b3daad88a
commit ab339d396a
34 changed files with 464 additions and 11845 deletions

View File

@@ -1,6 +1,7 @@
import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import { RedisSearchLanguages, SchemaFieldTypes, SchemaTextFieldPhonetics, transformArguments } from './CREATE';
import { SchemaFieldTypes, SchemaTextFieldPhonetics, transformArguments } from './CREATE';
import { RedisSearchLanguages } from '.';
describe('CREATE', () => {
describe('transformArguments', () => {
@@ -111,6 +112,20 @@ describe('CREATE', () => {
['FT.CREATE', 'index', 'SCHEMA', 'field', 'TAG', 'SEPERATOR', 'seperator']
);
});
it('with CASESENSITIVE', () => {
assert.deepEqual(
transformArguments('index', {
field: {
type: SchemaFieldTypes.TAG,
CASESENSITIVE: true
}
}),
['FT.CREATE', 'index', 'SCHEMA', 'field', 'TAG', 'CASESENSITIVE']
);
});
});
describe('with generic options', () => {
@@ -126,18 +141,6 @@ describe('CREATE', () => {
);
});
it('with CASESENSITIVE', () => {
assert.deepEqual(
transformArguments('index', {
field: {
type: SchemaFieldTypes.TEXT,
CASESENSITIVE: true
}
}),
['FT.CREATE', 'index', 'SCHEMA', 'field', 'TEXT', 'CASESENSITIVE']
);
});
describe('with SORTABLE', () => {
it('true', () => {
assert.deepEqual(