Browse Source

export key id

Kieran Gibb 2 years ago
parent
commit
0ec8c7655f
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions
  1. 1
    0
      index.js
  2. 7
    0
      test/index.test.js

+ 1
- 0
index.js View File

@@ -10,6 +10,7 @@ const CONFIG_FILE = 'config.yml'
10 10
 const IDENTITY_SUBKEY_ID = 0
11 11
 
12 12
 module.exports = (storage, opts) => new CoBoxConfig(storage, opts)
13
+module.exports.IDENTITY_SUBKEY_ID = IDENTITY_SUBKEY_ID
13 14
 
14 15
 const KeyHandler = require('./lib/key-handler')
15 16
 const MapHandler = require('./lib/map-handler')

+ 7
- 0
test/index.test.js View File

@@ -7,6 +7,13 @@ const yaml = require('js-yaml')
7 7
 
8 8
 const { tmp, cleanup } = require('./util')
9 9
 
10
+describe('exports', (context) => {
11
+  context('IDENTITY_SUBKEY_ID', (assert, next) => {
12
+    assert.same(Config.IDENTITY_SUBKEY_ID, 0, 'exports IDENTITY_SUBKEY_ID')
13
+    next()
14
+  })
15
+})
16
+
10 17
 describe('load', (context) => {
11 18
   context('default', (assert, next) => {
12 19
     var storage = tmp()