-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:KeesCBakker/hubot-command-mapper
- Loading branch information
Showing
10 changed files
with
114 additions
and
77 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { createTestBot, TestBotContext } from "../common/test-bot" | ||
import { expect } from "chai" | ||
import { map_command, RestParameter } from "../../src" | ||
|
||
describe("multiline.spec.ts > todo example", () => { | ||
let context: TestBotContext | ||
|
||
beforeEach(async () => { | ||
context = await createTestBot() | ||
map_command(context.robot, "act", new RestParameter("value"), context => context.res.reply(context.values.value)) | ||
}) | ||
|
||
afterEach(() => context.shutdown()) | ||
|
||
it("one line", async () => { | ||
let line = "And now the end is here" | ||
let result = await context.sendAndWaitForResponse("hubot act " + line) | ||
expect(result).to.eql(line) | ||
}) | ||
|
||
it("two lines", async () => { | ||
let line = "And now the end is here\nAnd so I face that final curtain" | ||
let result = await context.sendAndWaitForResponse("hubot act " + line) | ||
expect(result).to.eql(line) | ||
}) | ||
|
||
it("three lines", async () => { | ||
let line = "And now the end is here\nAnd so I face that final curtain\nMy friend I'll make it clear" | ||
let result = await context.sendAndWaitForResponse("hubot act " + line) | ||
expect(result).to.eql(line) | ||
}) | ||
}) |