Files
hive/mcp-server/node_modules/lunr/test/token_test.js
anthonyrawlins e89f2f4b7b Add comprehensive development roadmap via GitHub Issues
Created 10 detailed GitHub issues covering:
- Project activation and management UI (#1-2)
- Worker node coordination and visualization (#3-4)
- Automated GitHub repository scanning (#5)
- Intelligent model-to-issue matching (#6)
- Multi-model task execution system (#7)
- N8N workflow integration (#8)
- Hive-Bzzz P2P bridge (#9)
- Peer assistance protocol (#10)

Each issue includes detailed specifications, acceptance criteria,
technical implementation notes, and dependency mapping.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-12 19:41:01 +10:00

61 lines
1.5 KiB
JavaScript

suite('lunr.Token', function () {
suite('#toString', function () {
test('converts the token to a string', function () {
var token = new lunr.Token('foo')
assert.equal('foo', token.toString())
})
})
suite('#metadata', function () {
test('can attach arbitrary metadata', function () {
var token = new lunr.Token('foo', { length: 3 })
assert.equal(3, token.metadata.length)
})
})
suite('#update', function () {
test('can update the token value', function () {
var token = new lunr.Token('foo')
token.update(function (s) {
return s.toUpperCase()
})
assert.equal('FOO', token.toString())
})
test('metadata is yielded when updating', function () {
var metadata = { bar: true },
token = new lunr.Token('foo', metadata),
yieldedMetadata
token.update(function (_, md) {
yieldedMetadata = md
})
assert.equal(metadata, yieldedMetadata)
})
})
suite('#clone', function () {
var token = new lunr.Token('foo', { bar: true })
test('clones value', function () {
assert.equal(token.toString(), token.clone().toString())
})
test('clones metadata', function () {
assert.equal(token.metadata, token.clone().metadata)
})
test('clone and modify', function () {
var clone = token.clone(function (s) {
return s.toUpperCase()
})
assert.equal('FOO', clone.toString())
assert.equal(token.metadata, clone.metadata)
})
})
})