10 lines
421 B
TypeScript
10 lines
421 B
TypeScript
import { expect } from "chai"
|
|
import { addGreentext } from "@/utils/greentext"
|
|
|
|
describe("Greentext", () => {
|
|
it("Should add greentext class", () => {
|
|
const text = "test<br>>greentext1<br>abc<br>>greentext2<br>xyz"
|
|
const result = addGreentext(text)
|
|
expect(result).to.equal('test<br><span class="greentext">>greentext1</span><br>abc<br><span class="greentext">>greentext2</span><br>xyz')
|
|
})
|
|
})
|