summaryrefslogtreecommitdiff
path: root/sbt-plugin-test/withDOM/src/test/scala/sbttest/withDOM/LibTest.scala
blob: e08e6e38a1ec0c2f0a7643ed8d547e71d1f0e26a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package sbttest.withDOM

import scala.scalajs.js

import org.scalajs.jasminetest.JasmineTest

object LibTest extends JasmineTest {

  describe("Dummy Library") {

    it("should provide jQuery") {
      expect(Lib.jQuery).toBeDefined
    }

    it("should append an element") {
      def count = Lib.jQuery("p").length.asInstanceOf[Int]
      val oldCount = count
      Lib.appendDocument("foo")
      expect(count - oldCount).toEqual(1)
    }

  }

}