1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

add missing fields support to schema (v4) (#2789)

This commit is contained in:
Shaya Potter
2024-07-17 11:36:45 +03:00
committed by GitHub
parent 64fca37944
commit 0e7e2e6e29
2 changed files with 62 additions and 3 deletions

View File

@@ -441,6 +441,36 @@ describe('CREATE', () => {
);
});
});
describe('Missing Values', () => {
it('with INDEXEMPTY', () => {
assert.deepEqual(
transformArguments('index', {
field: {
type: SchemaFieldTypes.TEXT,
MISSING_VALUES: {
INDEXEMPTY: true
}
}
}),
['FT.CREATE', 'index', 'SCHEMA', 'field', 'TEXT', 'INDEXEMPTY']
);
});
it('with INDEXMISSING', () => {
assert.deepEqual(
transformArguments('index', {
field: {
type: SchemaFieldTypes.TEXT,
MISSING_VALUES: {
INDEXMISSING: true
}
}
}),
['FT.CREATE', 'index', 'SCHEMA', 'field', 'TEXT', 'INDEXMISSING']
);
});
});
});
testUtils.testWithClient('client.ft.create', async client => {