Commit 635e23e3 authored by Aral Balkan's avatar Aral Balkan
Browse files

Add failing test for multiline string read crash (#10)

parent a8a28b5b
......@@ -164,6 +164,23 @@ test('basic persistence', t => {
t.strictEquals(JSON.stringify(db.people), inMemoryStateOfPeopleTableFromOriginalDatabase, 'loaded data matches previous state of the in-memory table')
//
// Test loading in of multiline string.
// Issue: https://github.com/small-tech/jsdb/issues/10
//
db.stringTest = {
multiline: `
a
multiline
string
`
}
await db.close()
t.doesNotThrow(() => db = JSDB.open(databasePath), 'loading in multiline string does not throw')
//
// Table compaction.
//
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment