mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-17 11:41:44 +00:00
jest-codemods tests/lib
This commit is contained in:
@@ -4,11 +4,10 @@
|
||||
|
||||
import CodeMirror from 'codemirror'
|
||||
require('codemirror/addon/search/searchcursor.js')
|
||||
const test = require('ava')
|
||||
const markdownToc = require('browser/lib/markdown-toc-generator')
|
||||
const EOL = require('os').EOL
|
||||
|
||||
test(t => {
|
||||
test(() => {
|
||||
/**
|
||||
* Contains array of test cases in format :
|
||||
* [
|
||||
@@ -261,11 +260,11 @@ this is a text
|
||||
const expectedToc = testCase[2].trim()
|
||||
const generatedToc = markdownToc.generate(inputMd)
|
||||
|
||||
t.is(generatedToc, expectedToc, `generate test : ${title} , generated : ${EOL}${generatedToc}, expected : ${EOL}${expectedToc}`)
|
||||
expect(generatedToc).toBe(expectedToc)
|
||||
})
|
||||
})
|
||||
|
||||
test(t => {
|
||||
test(() => {
|
||||
/**
|
||||
* Contains array of test cases in format :
|
||||
* [
|
||||
@@ -663,6 +662,6 @@ this is a level one text
|
||||
editor.setCursor(cursor)
|
||||
markdownToc.generateInEditor(editor)
|
||||
|
||||
t.is(expectedMd, editor.getValue(), `generateInEditor test : ${title} , generated : ${EOL}${editor.getValue()}, expected : ${EOL}${expectedMd}`)
|
||||
expect(expectedMd).toBe(editor.getValue())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user