added tests and fixed meme. raised node listener limit (we got many tests)
This commit is contained in:
parent
b77dd53523
commit
7405426dea
@ -3,6 +3,9 @@ path = require "path"
|
|||||||
Robot = require("hubot/src/robot")
|
Robot = require("hubot/src/robot")
|
||||||
TextMessage = require("hubot/src/message").TextMessage
|
TextMessage = require("hubot/src/message").TextMessage
|
||||||
|
|
||||||
|
# Raise listeners limit
|
||||||
|
process.setMaxListeners(20)
|
||||||
|
|
||||||
before = (done) ->
|
before = (done) ->
|
||||||
process.env.TESTING_ASJON = 'true'
|
process.env.TESTING_ASJON = 'true'
|
||||||
robot = new Robot null, "mock-adapter", no, 'asjon'
|
robot = new Robot null, "mock-adapter", no, 'asjon'
|
||||||
|
@ -15,6 +15,9 @@ module.exports = (robot) ->
|
|||||||
|
|
||||||
robot.respond /meme (.+)/i, (res) ->
|
robot.respond /meme (.+)/i, (res) ->
|
||||||
text = res.match[1]
|
text = res.match[1]
|
||||||
|
if(text.split(',').length != 3)
|
||||||
|
res.send 'richiesta malformata: prova a chiedermi "asjon help meme" per sapere sapere come funziona il comando'
|
||||||
|
else
|
||||||
meme = (escape i.trim() for i in text.split ',').join '/'
|
meme = (escape i.trim() for i in text.split ',').join '/'
|
||||||
url = 'http://memegen.link/' + meme + '.jpg'
|
url = 'http://memegen.link/' + meme + '.jpg'
|
||||||
res.send url
|
res.send url
|
||||||
|
Loading…
Reference in New Issue
Block a user