-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest__api-properties.js
41 lines (38 loc) · 1.49 KB
/
test__api-properties.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* @module test__api
*/
/* jshint node: true */
/* globals afterAll, beforeAll, describe, expect, test */
'use strict'
require('dotenv').config({ path: '__test__/.env',})
/**
* db-local storage tester
*/
const fs = require('fs')
const path = require('path')
const _module = path.basename(__filename)
const config = require('config')
const log = require('pino')(config.get('log_options'))
const u = require('../src/lib/util')
describe(`${_module}`, () => {
describe('post', () => {
test('201 label', () => {
expect(config.get('paths./assets.post.responses.201.content.application/json.example.status_label').length).toBeGreaterThan(3)
})
test('201 description', () => {
expect(config.get('paths./assets.post.responses.201.description').length).toBeGreaterThan(3)
})
test('409 label', () => {
expect(config.get('paths./assets.post.responses.409.content.application/json.example.status_label').length).toBeGreaterThan(3)
})
test('409 description', () => {
expect(config.get('paths./assets.post.responses.409.description').length).toBeGreaterThan(3)
})
test('415 label', () => {
expect(config.get('paths./assets.post.responses.415.content.application/json.example.status_label').length).toBeGreaterThan(3)
})
test('415 description', () => {
expect(config.get('paths./assets.post.responses.415.description').length).toBeGreaterThan(3)
})
})
})