Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed https://markdown-it.github.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
449 B

import { assert } from 'chai'
import Token from '../lib/token.mjs'
describe('Token', function () {
it('attr', function () {
const t = new Token('test_token', 'tok', 1)
assert.strictEqual(t.attrs, null)
assert.equal(t.attrIndex('foo'), -1)
t.attrPush(['foo', 'bar'])
t.attrPush(['baz', 'bad'])
assert.equal(t.attrIndex('foo'), 0)
assert.equal(t.attrIndex('baz'), 1)
assert.equal(t.attrIndex('none'), -1)
})
})