mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +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 => {
|
||||
// [input, expected]
|
||||
const testCases = [
|
||||
['# hoge\nhoge', 'hoge'],
|
||||
['# hoge\nfuga', '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 => {
|
||||
|
||||
Reference in New Issue
Block a user