fix tests

This commit is contained in:
Hongbo Wu
2024-04-11 11:00:18 +08:00
parent f66d3fa36c
commit 07a14e0a7f
2 changed files with 2 additions and 28 deletions

View File

@ -2,7 +2,7 @@ import { expect } from 'chai'
import 'mocha'
import parseHeaders from 'parse-headers'
import rfc2047 from 'rfc2047'
import { parsedTo, plainTextToHtml } from '../src'
import { parsedTo } from '../src'
import {
getConfirmationCode,
isGoogleConfirmationEmail,
@ -138,29 +138,3 @@ describe('decode and parse headers', () => {
})
})
})
describe('plainTextToHtml', () => {
it('converts text to html', () => {
const text =
'DEVOPS WEEKLY\r\n' +
'ISSUE #665 - 24th September 2023\r\n' +
'\r\n' +
'A few posts on CI tooling this week, along with a good introduction to developer portals/platforms and other topics.\r\n' +
'\r\n' +
'StackHawk sponsors Devops Weekly\r\n' +
'============================\r\n' +
'\r\n' +
'Experience automated security testing without the hassle of connecting your own app or configuring an environment! Follow the Tutorial to try out StackHawk and explore a world where security becomes an accelerator, not a blocker\r\n' +
'\r\n' +
'https://sthwk.com/tutorial\r\n' +
'\r\n'
expect(plainTextToHtml(text)).to.eql(
`<p>DEVOPS WEEKLY
ISSUE #665 - 24th September 2023</p>
<p>A few posts on CI tooling this week, along with a good introduction to developer portals/platforms and other topics.</p>
<h1 id="stackhawksponsorsdevopsweekly">StackHawk sponsors Devops Weekly</h1>
<p>Experience automated security testing without the hassle of connecting your own app or configuring an environment! Follow the Tutorial to try out StackHawk and explore a world where security becomes an accelerator, not a blocker</p>
<p>https://sthwk.com/tutorial</p>`
)
})
})

View File

@ -5,5 +5,5 @@
"rootDir": ".",
"lib": ["dom"]
},
"include": ["src"]
"include": ["src", "test"]
}