1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 02:28:54 +08:00

add tests for Logs component #27

This commit is contained in:
lana-k
2021-04-12 14:28:16 +02:00
parent 9ce1c27cf5
commit a7c8c29624
2 changed files with 87 additions and 3 deletions

View File

@@ -37,11 +37,13 @@ export default {
if (msg.row !== null && msg.row !== undefined) {
result += `Error in row ${msg.row}. `
}
result += msg.message
if (!(/(\.|!|\?)$/.test(result))) {
result += '.'
}
if (msg.hint) {
if (!(result[0] in ['.', '!', '?'])) {
result += '.'
}
result += ` ${msg.hint}`
}
return result