deno.land / x / fuse@v6.4.1 / test / feature-flags.test.js

feature-flags.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// use basic build so that errors are thrownconst Fuse = require('../dist/fuse.basic')import * as ErrorMsg from '../src/core/errorMessages'const Books = require('./fixtures/books.json')
describe('Initialization errors', () => { test('Errors are thrown', () => { expect(() => { new Fuse(Books, { useExtendedSearch: true, keys: ['title'] }) }).toThrowError(ErrorMsg.EXTENDED_SEARCH_UNAVAILABLE)
expect(() => { let fuse = new Fuse(Books, { keys: ['title'] }) fuse.search({ title: 'hello' }) }).toThrowError(ErrorMsg.LOGICAL_SEARCH_UNAVAILABLE) })})
fuse

Version Info

Tagged at
3 years ago