Browse Source

fix path in test

Kieran Gibb 2 years ago
parent
commit
104c5548ee
No known key found for this signature in database
2 changed files with 9 additions and 5 deletions
  1. 7
    4
      .gitignore
  2. 2
    1
      test/messages.test.js

+ 7
- 4
.gitignore View File

@@ -1,5 +1,3 @@
1
-mnt/
2
-
3 1
 # Logs
4 2
 logs
5 3
 *.log
@@ -61,5 +59,10 @@ typings/
61 59
 
62 60
 # next.js build output
63 61
 .next
64
-views/
65
-db/
62
+
63
+# tmp directory for tests
64
+tmp/
65
+
66
+# local mount directory
67
+mnt/
68
+

+ 2
- 1
test/messages.test.js View File

@@ -2,12 +2,13 @@ const { describe } = require('tape-plus')
2 2
 const fs = require('fs')
3 3
 const protobuf = require('protocol-buffers')
4 4
 const crypto = require('crypto')
5
+const path = require('path')
5 6
 
6 7
 describe('schema.proto', (context) => {
7 8
   let messages
8 9
 
9 10
   context.beforeEach((c) => {
10
-    messages = protobuf(fs.readFileSync('./schema.proto'))
11
+    messages = protobuf(fs.readFileSync(path.join(__dirname, '..', 'schema.proto')))
11 12
   })
12 13
 
13 14
   context('Feed', (assert, next) => {