Created
August 12, 2011 06:23
-
-
Save kornysietsma/1141566 to your computer and use it in GitHub Desktop.
sbt sample
This file contains hidden or 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
lazy val javascriptIntegrationTest = task { | |
val statusLogger: JasmineStatusLogger = new JasmineStatusLogger(log) | |
val workingDirectory = new File(info.projectPath.asFile, "src/it/javascript").getPath | |
val phantomJasmine = workingDirectory + "/phantom-jasmine.js" | |
val specRunner = workingDirectory + "/SpecRunner.html" | |
val reportDir = new File(info.projectPath.asFile.getParent, | |
"app/target/reports/javascript-test/").getPath | |
try { | |
run(List("/usr/bin/phantomjs", phantomJasmine, specRunner, reportDir), true) | |
None | |
} catch { | |
case e: Exception => { | |
Some("jasmine specs failed. To see why, run the chrome-for-tests command in a terminal, not in sbt") | |
} | |
} | |
} dependsOn(javascriptTemplates) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment