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