Permalink
Browse files
maybe added init and test
- Loading branch information...
Showing
with
21 additions
and
0 deletions.
-
+1
−0
bot.coffee
-
+20
−0
test/promet.coffee
|
|
@@ -19,6 +19,7 @@ require("./scripts/set-get")(bot) |
|
|
require("./scripts/vreme")(bot)
|
|
|
require("./scripts/apt")(bot)
|
|
|
require("./scripts/url")(bot)
|
|
|
+require("./scripts/promet")(bot)
|
|
|
|
|
|
bot.command /^.(pomo[čc]|help)$/i, (r) ->
|
|
|
msg = bot.help.join "\n"
|
|
|
|
|
|
@@ -0,0 +1,20 @@ |
|
|
+chai = require 'chai'
|
|
|
+should = chai.should()
|
|
|
+expect = chai.expect
|
|
|
+
|
|
|
+fat = require '../lib/fat_tests'
|
|
|
+
|
|
|
+describe 'promet.coffee', ->
|
|
|
+ this.timeout 16000
|
|
|
+ bot = require("../scripts/promet")(new fat.BotTest())
|
|
|
+ # generic test
|
|
|
+ it 'should display help', (done)->
|
|
|
+ bot.help.should.be.an 'array'
|
|
|
+ expect(bot.help.length).to.be.at.least 2
|
|
|
+ done()
|
|
|
+
|
|
|
+ it 'test .promet', (done)->
|
|
|
+ bot.test ".promet", (msg)->
|
|
|
+ expect(msg).to.be.a('string')
|
|
|
+ expect(msg.length).to.be.at.least 40
|
|
|
+ done()
|
0 comments on commit
4e5dfcc