1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Files
docs/tests/unit/algolia/rank.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

16 lines
566 B
JavaScript

const rank = require('../../../lib/algolia/rank')
test('algolia custom rankings', () => {
const expectedRankings = [
['https://docs.github.com/en/github/actions', 3],
['https://docs.github.com/en/rest/reference', 2],
['https://docs.github.com/en/graphql', 1],
['https://docs.github.com/en/github/site-policy', 0]
]
expectedRankings.forEach(([url, expectedRanking]) => {
const expectationMessage = `expected ${url} to have a custom ranking of ${expectedRanking}`
expect(rank({ url }), expectationMessage).toBe(expectedRanking)
})
})