mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Add test cases
This commit is contained in:
@@ -9,9 +9,11 @@ const { findNoteTitle } = require('browser/lib/findNoteTitle')
|
|||||||
test('findNoteTitle#find should return a correct title (string)', t => {
|
test('findNoteTitle#find should return a correct title (string)', t => {
|
||||||
// [input, expected]
|
// [input, expected]
|
||||||
const testCases = [
|
const testCases = [
|
||||||
['# hoge\nhoge', 'hoge'],
|
['# hoge\nfuga', 'hoge'],
|
||||||
['# hoge_hoge_hoge', 'hoge_hoge_hoge'],
|
['# hoge_hoge_hoge', 'hoge_hoge_hoge'],
|
||||||
['```\n# hoge\n```\n# fuga', 'fuga']
|
['```\n# hoge\n```\n# fuga', 'fuga'],
|
||||||
|
['```\n# hoge\n```', '```'],
|
||||||
|
['hoge', 'hoge'],
|
||||||
]
|
]
|
||||||
|
|
||||||
testCases.forEach(testCase => {
|
testCases.forEach(testCase => {
|
||||||
|
|||||||
Reference in New Issue
Block a user