1
0
Fork 0

chore(core): Added test for Part.getId()

This commit is contained in:
Joost De Cock 2022-12-23 15:52:02 +01:00
parent 94a3d0be50
commit b5e9086152

View file

@ -31,6 +31,14 @@ describe('Part', () => {
expect(macro('unknown')).to.equal(undefined)
})
it('Should return a valid ID with Part.getId()', () => {
const part = new Part()
const id = part.getId()
const prefixed = part.getId('orange')
expect(id).to.equal('1')
expect(prefixed).to.equal('orange2')
})
it('Should register and run a macro', () => {
const plugin = {
name: 'test',