1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Add test cases

This commit is contained in:
asmsuechan
2017-05-23 15:43:54 +09:00
parent 005d8f84fd
commit 2bbe7056d1

View File

@@ -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 => {