Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Kosmaczewski committed Jul 17, 2023
1 parent 00db2bf commit fdd38bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ describe ('Search engine', () => {
expect(results1).to.deep.equal(results2)
})

it('does not return anything for non-existing versions', () => {
const results = search(lunrIndex, files, 'backup', undefined, 'savarasasa')
expect(results.length).to.equal(0)
})

it('can be filtered by version', () => {
const results = search(lunrIndex, files, 'backup', undefined, '0.1')
expect(results.length).to.equal(7)
Expand Down

0 comments on commit fdd38bb

Please sign in to comment.