Move client related into client/

This commit is contained in:
Raymonzut
2020-04-17 16:38:04 +02:00
parent b51cef3b85
commit 59d13265e2
17 changed files with 6 additions and 5 deletions
+10
View File
@@ -0,0 +1,10 @@
const assert = require('chai').assert
const me = require('../src/me')
describe('me', () => {
describe('age', () => {
it('should return a positive number', () => {
assert.isAbove(me.age(), 0)
})
})
})
+25
View File
@@ -0,0 +1,25 @@
const assert = require('chai').assert
const remote = require('../src/remote')
describe('remote', () => {
const data = remote.postData
describe('postData', () => {
it('should return an array', () => {
assert.typeOf(data, 'array')
})
it('should not be empty', () => {
assert.isAtLeast(data.length, 1)
})
it('should contain objects', () => {
for (obj of data) {
assert.typeOf(obj, 'object')
}
})
it('should have objects with properties', () => {
for (obj of data) {
assert.isAtLeast(Object.keys(obj).length, 1)
}
})
})
})