Skip to content

Commit

Permalink
Added list property in typings (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvin Dzhavadov authored Mar 2, 2020
1 parent 2efc7b3 commit be759d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ declare class Fuse<T, O extends Fuse.FuseOptions<T>> {
)

setCollection(list: ReadonlyArray<T>): ReadonlyArray<T>;
list: ReadonlyArray<T>
}

declare namespace Fuse {
Expand Down
4 changes: 4 additions & 0 deletions test/fuse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ describe('Flat list of strings: ["Apple", "Orange", "Banana"]', () => {
expect(fuse).toMatchObject(expected)
})

it('should have the list property', () => {
expect(fuse.list).toBe(defaultList)
})

describe('When searching for the term "Apple"', () => {
let result
beforeEach(() => result = fuse.search('Apple'))
Expand Down

0 comments on commit be759d5

Please sign in to comment.