Skip to content

Commit

Permalink
refactor: update tests descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBuchholz committed Feb 9, 2024
1 parent ac71c1b commit 797dfe7
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion reserve/src/config/checkMethod.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function test (method, expected, allowed) {
}
}

describe('checkMethod', () => {
describe('config/checkMethod', () => {
describe('value validation', () => {
it('ignores undefined', test(undefined, undefined))
it('validates string', test('post', ['POST']))
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/config/configuration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async function okHandler () {
return 'OK'
}

describe('configuration', () => {
describe('config/configuration', () => {
describe('configuration.read', () => {
beforeEach(() => {
process.mockCwd('/')
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/config/iconfiguration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const handler = {
}
}

describe('iconfiguration', () => {
describe('config/iconfiguration', () => {
describe('validate', () => {
it('passes mapping and configuration to the validate method', () => check({
handlers: {
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/config/schema.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { parse, validate } = require('./schema')
/* istanbul ignore next */ // Will not be called
function noop () {}

describe('schema', () => {
describe('config/schema', () => {
describe('parsing', () => {
it('expands property reduced to a type specification', () => {
const schema = parse({
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/body.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function request (chunks, headers) {
return stream
}

describe('body', () => {
describe('helpers/body', () => {
describe('without headers', () => {
it('deserializes the request body', async () => body(request([
'Hello',
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/capture.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function write (stream, content, steps, useEnd) {
loop()
}

describe('capture', () => {
describe('helpers/capture', () => {
let loremIpsum

before(async () => {
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/interpolate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function compare (result, expected) {

const match = [0, 'a', 'b', '%26', '%20']

describe('interpolate', () => {
describe('helpers/interpolate', () => {
describe('string', () => {
it('substitutes capturing groups', () => {
assert.strictEqual(interpolate(match, '$1$2'), 'ab')
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/normalize.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { describe, it } = require('mocha')
const assert = require('assert')
const normalize = require('./normalize')

describe('normalize', () => {
describe('helpers/normalize', () => {
const tests = {
'file.txt': '/file.txt',
'/../file.txt': '/file.txt',
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/portIsUsed.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const assert = require('assert')
const portIsUsed = require('./portIsUsed')
const http = require('http').__unmocked__

describe('portIsUsed', () => {
describe('helpers/portIsUsed', () => {
it('detects that the port is not used', async () => {
assert.strictEqual(await portIsUsed(80), false)
})
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/send.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { Readable } = require('stream')
const send = require('./send')
const Response = require('../mock/Response')

describe('send', () => {
describe('helpers/send', () => {
let response

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/helpers/smartImport.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { join } = require('path')

const base = join(__dirname, '../../tests')

describe('smartImport', () => {
describe('helpers/smartImport', () => {
it('imports CommonJS file if ending with .cjs', async () => {
const func = await smartImport(join(base, 'import.cjs'))
assert.strictEqual(typeof func, 'function')
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/log/log.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const {
EVENT_CLOSED
} = require('../event')

describe('log', () => {
describe('log/log', () => {
beforeEach(clean)

describe('non verbose', () => {
Expand Down
2 changes: 1 addition & 1 deletion reserve/src/log/logError.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const assert = require('assert')
const { console: { clean, collect } } = require('test-tools')
const logError = require('./logError')

describe('logError', () => {
describe('log/logError', () => {
beforeEach(clean)

it('logs errors non related to requests', () => {
Expand Down

0 comments on commit 797dfe7

Please sign in to comment.