Skip to content

Commit

Permalink
Merge branch 'master' into better-modal
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmelnikow authored Jan 11, 2019
2 parents 9cc1d9c + da12f00 commit ff37c71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion services/bstats/bstats-players.service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const BaseJsonService = require('../base-json')
const { metric } = require('../../lib/text-formatters')

const Joi = require('joi')
const schema = Joi.array()
Expand Down Expand Up @@ -49,7 +50,7 @@ module.exports = class BStatsPlayers extends BaseJsonService {

static render({ players }) {
return {
message: players,
message: metric(players),
}
}

Expand Down
3 changes: 2 additions & 1 deletion services/bstats/bstats-players.tester.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const Joi = require('joi')
const { isMetric } = require('../test-validators')

const t = (module.exports = require('../create-service-tester')())

Expand All @@ -9,6 +10,6 @@ t.create('Players')
.expectJSONTypes(
Joi.object().keys({
name: 'players',
value: Joi.number(),
value: isMetric,
})
)
3 changes: 2 additions & 1 deletion services/bstats/bstats-servers.service.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const BaseJsonService = require('../base-json')
const { metric } = require('../../lib/text-formatters')

const Joi = require('joi')
const schema = Joi.array()
Expand Down Expand Up @@ -49,7 +50,7 @@ module.exports = class BStatsServers extends BaseJsonService {

static render({ servers }) {
return {
message: servers,
message: metric(servers),
}
}

Expand Down
3 changes: 2 additions & 1 deletion services/bstats/bstats-servers.tester.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const Joi = require('joi')
const { isMetric } = require('../test-validators')

const t = (module.exports = require('../create-service-tester')())

Expand All @@ -9,6 +10,6 @@ t.create('Servers')
.expectJSONTypes(
Joi.object().keys({
name: 'servers',
value: Joi.number(),
value: isMetric,
})
)

0 comments on commit ff37c71

Please sign in to comment.