import { expect } from 'chai' import { extractionsParsers } from '../../../../src/extraction' const html = extractionsParsers.html describe('detections', () => { describe('attrs', () => { it('html', () => { expect(html.detect('
')).to.matchSnapshot() expect(html.detect(` `)).to.matchSnapshot() expect(html.detect('Popular Tags
')).to.matchSnapshot() }) it('mixed text', () => { expect(html.detect(`
Using mustaches: {{ rawHtml }}
')).to.matchSnapshot() }) it('ignore translated keys', () => { expect(html.detect('{{ $t("hello.world") }}
').length).to.eq(0) expect(html.detect('').length).to.eq(0) expect(html.detect('').length).to.eq(0) }) it('multiple lines', () => { expect(html.detect(`Using v-html directive:
`)).to.matchSnapshot() }) it('invalid', () => { expect(html.detect('class.name
')).eql([]) expect(html.detect('{{ $t("hello") }}
')).eql([]) }) it('exclude tag', () => { expect(html.detect('')).eql([]) expect(html.detect('')).eql([]) }) }) })