summaryrefslogtreecommitdiff
path: root/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala
diff options
context:
space:
mode:
authorHaoyi Li <haoyi@haoyi-mbp.corp.dropbox.com>2014-11-26 00:45:31 -0800
committerHaoyi Li <haoyi@haoyi-mbp.corp.dropbox.com>2014-11-26 00:45:31 -0800
commit2c4b142503bd2d871e6818b5cab8c38627d9e4a0 (patch)
tree6ba33d2980a1a7a1286100202a695c6631bd240e /jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala
downloadhands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.tar.gz
hands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.tar.bz2
hands-on-scala-js-2c4b142503bd2d871e6818b5cab8c38627d9e4a0.zip
Squashed 'examples/scala-js/' content from commit 47311ba
git-subtree-dir: examples/scala-js git-subtree-split: 47311ba693f949f204f27ea9475bb63425fbd4f3
Diffstat (limited to 'jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala')
-rw-r--r--jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala34
1 files changed, 34 insertions, 0 deletions
diff --git a/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala b/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala
new file mode 100644
index 0000000..715d39d
--- /dev/null
+++ b/jasmine-test-framework/src/main/scala/org/scalajs/jasminetest/JasmineTest.scala
@@ -0,0 +1,34 @@
+/* __ *\
+** ________ ___ / / ___ __ ____ Scala.js Test Framework **
+** / __/ __// _ | / / / _ | __ / // __/ (c) 2013, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ |/_// /_\ \ http://scala-js.org/ **
+** /____/\___/_/ |_/____/_/ | |__/ /____/ **
+** |/____/ **
+\* */
+
+
+package org.scalajs.jasminetest
+
+import scala.scalajs.js
+import scala.scalajs.testbridge._
+
+import java.util.regex.Pattern
+import org.scalajs.jasmine.Jasmine
+import org.scalajs.jasmine.JasmineExpectation
+
+class JasmineTest extends Test with TestSuiteContext {
+ def jasmine = Jasmine.jasmine
+ def describe(name: String)(suite: => Unit): Unit = Jasmine.describe(name, suite _)
+ def it(title: String)(test: => Unit): Unit = Jasmine.it(title, test _)
+ def xdescribe(name: String)(suite: => Unit): Unit = Jasmine.xdescribe(name, suite _)
+ def xit(title: String)(test: => Unit): Unit = Jasmine.xit(title, test _)
+ def beforeEach(block: => Unit): Unit = Jasmine.beforeEach(block _)
+ def afterEach(block: => Unit): Unit = Jasmine.afterEach(block _)
+ def expect(exp: CharSequence): JasmineExpectation =
+ Jasmine.expect(if (exp == null) null else exp.toString)
+ def expect(exp: js.Any): JasmineExpectation = Jasmine.expect(exp)
+ def runs(block: => Unit): Unit = Jasmine.runs(block _)
+ def waits(timeout: Int): Unit = Jasmine.waits(timeout)
+ def waitsFor(block: => Boolean, errorMsg: String, timeout: Int): Unit =
+ Jasmine.waitsFor(block _, errorMsg, timeout)
+}