Skip to content

Commit

Permalink
[backend:test] Add simple tests for emoji rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Jun 15, 2019
1 parent b577950 commit 85ad7aa
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package io.github.nwtgck.gh_card.emoji

import org.scalatest.{FunSpec, Matchers}

class EmojiRendererSpec extends FunSpec with Matchers {
describe("EmojiRendererSpec") {
it("should render") {
val actual = EmojiRenderer.render("hello :tada: world")
val expect = "hello 🎉 world"
actual shouldBe expect
}
it("should render with many spaces") {
val actual = EmojiRenderer.render("hello :tada: world")
val expect = "hello 🎉 world"
actual shouldBe expect
}
it("should render with space/tab mixed") {
val actual = EmojiRenderer.render("hello :tada:\tworld")
val expect = "hello 🎉\tworld"
actual shouldBe expect
}
}
}

0 comments on commit 85ad7aa

Please sign in to comment.