Move a.mjs, b.mjs, json and logjson files into /tests
authorNick Downing <nick@ndcode.org>
Fri, 7 Jan 2022 05:18:29 +0000 (16:18 +1100)
committerNick Downing <nick@ndcode.org>
Fri, 7 Jan 2022 05:18:29 +0000 (16:18 +1100)
.gitignore
tests/a.mjs [moved from a.mjs with 96% similarity]
tests/b.mjs [moved from b.mjs with 88% similarity]
tests/random.json [moved from random.json with 100% similarity]

index e5061a5..a77e7b2 100644 (file)
@@ -1,2 +1,4 @@
-/a.json
-/a.logjson
+/tests/a.json
+/tests/b.json
+/tests/c.json
+/tests/a.logjson
similarity index 96%
rename from a.mjs
rename to tests/a.mjs
index 89f8fc8..a591b3e 100755 (executable)
--- a/a.mjs
@@ -1,6 +1,6 @@
 #!/usr/bin/env node
 
-import logjson from './logjson.mjs'
+import logjson from '../logjson.mjs'
 import fsPromises from 'fs/promises'
 
 let database = new logjson.Database(5, 1)
similarity index 88%
rename from b.mjs
rename to tests/b.mjs
index b47c9aa..e2afb69 100755 (executable)
--- a/b.mjs
@@ -1,13 +1,13 @@
 #!/usr/bin/env node
 
-import logjson from './logjson.mjs'
+import logjson from '../logjson.mjs'
 import fsPromises from 'fs/promises'
 
 let database = new logjson.Database()
 await database.open('a.logjson')
 let transaction = database.Transaction()
 await fsPromises.writeFile(
-  'a.json',
+  'c.json',
   Buffer.from(
     JSON.stringify(
       await logjson.logjson_to_json(await transaction.get()),
similarity index 100%
rename from random.json
rename to tests/random.json