world/book/node_modules/lunr/test/stemmer_test.js
2025-05-12 05:38:44 +09:00

15 lines
410 B
JavaScript

module('lunr.stemmer')
test('should stem words correctly', function () {
Object.keys(stemmingFixture).forEach(function (testWord) {
var expected = stemmingFixture[testWord]
equal(lunr.stemmer(testWord), expected)
})
})
test('should be registered with lunr.Pipeline', function () {
equal(lunr.stemmer.label, 'stemmer')
deepEqual(lunr.Pipeline.registeredFunctions['stemmer'], lunr.stemmer)
})