Expose message Ids to the user
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
import 'mocha'
|
||||
|
||||
import { Tree, TreeNodeFactory } from '../'
|
||||
|
||||
import { expect } from 'chai'
|
||||
import { Tree } from '../'
|
||||
import { makeTreeNode } from './makeTreeNode'
|
||||
|
||||
describe('Tree', () => {
|
||||
it('node can be merged into a tree', () => {
|
||||
const tree = new Tree()
|
||||
|
||||
const topics = 'foo/bar'.split('/')
|
||||
const leaf = TreeNodeFactory.fromEdgesAndValue(topics, undefined)
|
||||
const leaf = makeTreeNode('foo/bar')
|
||||
|
||||
tree.updateWithNode(leaf.firstNode())
|
||||
const expectedNode = tree.findNode('foo/bar')
|
||||
|
||||
expect(expectedNode).to.eq(leaf)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user