Skip to content

Commit fc51856

Browse files
committed
test: cleanup test files
1 parent 66a9a9f commit fc51856

10 files changed

Lines changed: 4 additions & 76 deletions

test/generateConfig.test.js

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,13 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const generateConfig = require('../lib/generateConfig')
62

73
describe('generateConfig', () => {
84
process.env.NODE_ENV = 'dev'
95

106
it('can merge three config objects', () => {
11-
const conf1 = {
12-
a: 4,
13-
b: {
14-
c: 44
15-
}
16-
}
17-
const conf2 = {
18-
b: {
19-
d: '45',
20-
e: {
21-
f: 19
22-
}
23-
}
24-
}
25-
const conf3 = {
26-
a: 68,
27-
b: {
28-
e: {
29-
f: '112',
30-
g: 357
31-
}
32-
}
33-
}
7+
const conf1 = { a: 4, b: { c: 44 } }
8+
const conf2 = { b: { d: '45', e: { f: 19 } } }
9+
const conf3 = { a: 68, b: { e: { f: '112', g: 357 } } }
3410
const obj = generateConfig([conf1, conf2, conf3])
35-
expect(obj).toEqual({
36-
a: 68,
37-
b: {
38-
c: 44,
39-
d: '45',
40-
e: {
41-
f: '112',
42-
g: 357
43-
}
44-
},
45-
env: 'dev'
46-
})
11+
expect(obj).toEqual({ a: 68, b: { c: 44, d: '45', e: { f: '112', g: 357 } }, env: 'dev' })
4712
})
4813
})

test/unpackApiKeysConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackApiKeysConfig = require('../lib/unpackApiKeysConfig')
62

73
const uriOne = '?name=devClient&apiKey=1234&scope=write&scope=read'

test/unpackKOPPSConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackKOPPSConfig = require('../lib/unpackKOPPSConfig')
62

73
const testURI = 'http://kopps-r.referens.sys.kth.se/api/kopps/v2/'

test/unpackMongodbConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackMongodbConfig = require('../lib/unpackMongodbConfig')
62

73
const testURI = 'mongodb://username@email.com:password@mongohost:27017/innovation?ssl=false'

test/unpackNodeApiConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackNodeApiConfig = require('../lib/unpackNodeApiConfig')
62

73
const testURI = 'http://node-api:3001/api/node'

test/unpackRedisConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackRedisConfig = require('../lib/unpackRedisConfig')
62

73
const testURI = 'redis://localhost:6379/'

test/unpackSMTPConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackSMTPConfig = require('../lib/unpackSMTPConfig')
62

73
const testURI = 'smtp://smtp.kth.se:25'

test/unpackSQLServerConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackSequelizeConfig = require('../lib/unpackSequelizeConfig')
62

73
const testInstanceURI = 'mssql://username:password@db.test.com/InstanceName/DbName'

test/unpackSequelizeConfig.test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/* eslint-disable no-unused-expressions */
2-
/* eslint-env mocha */
3-
4-
'use strict'
5-
61
const unpackSequelizeConfig = require('../lib/unpackSequelizeConfig')
72

83
const testURI = 'sqlite://path/to/my/db/database.sqlite'

test/unpackSqliteConfig.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-env mocha */
2-
3-
'use strict'
4-
51
const unpackSequelizeConfig = require('../lib/unpackSequelizeConfig')
62

73
const testPathToFile = 'path/to/my/db/database.sqlite'

0 commit comments

Comments
 (0)