chore: add sourcemap

This commit is contained in:
Innei
2021-09-13 18:37:02 +08:00
parent e894182d2d
commit e718dd0d24
7 changed files with 7 additions and 90 deletions

View File

@@ -1,12 +1,16 @@
import { sleep } from '~/utils/index.util'
import { pickImagesFromMarkdown } from '~/utils/pic.util'
describe('src/utils/pic.util', () => {
it('test marked ast', () => {
it('test marked ast', async () => {
const res = pickImagesFromMarkdown(`
![](https://cdn.innei.ren/bed/2021/0813211729.jpeg)
![](https://cdn.innei.ren/bed/2021/0813212633.jpg)
`)
// FIXME: ReferenceError: You are trying to import a file after the Jest environment has been torn down
// gifwrap@0.9.2
await sleep(1)
expect(res).toEqual([
'https://cdn.innei.ren/bed/2021/0813211729.jpeg',
'https://cdn.innei.ren/bed/2021/0813212633.jpg',