JUnit Jasmine Runner

A JUnit runner for Jasmine

License

License

Categories

Categories

JUnit Unit Testing ASM Application Layer Libs Bytecode Manipulation
GroupId

GroupId

de.helwich.junit
ArtifactId

ArtifactId

junit-jasmine-runner
Last Version

Last Version

0.1.4
Release Date

Release Date

Type

Type

jar
Description

Description

JUnit Jasmine Runner
A JUnit runner for Jasmine
Project URL

Project URL

https://github.com/hhelwich/junit-jasmine-runner
Source Code Management

Source Code Management

https://github.com/hhelwich/junit-jasmine-runner

Download junit-jasmine-runner

How to add to project

<!-- https://jarcasting.com/artifacts/de.helwich.junit/junit-jasmine-runner/ -->
<dependency>
    <groupId>de.helwich.junit</groupId>
    <artifactId>junit-jasmine-runner</artifactId>
    <version>0.1.4</version>
</dependency>
// https://jarcasting.com/artifacts/de.helwich.junit/junit-jasmine-runner/
implementation 'de.helwich.junit:junit-jasmine-runner:0.1.4'
// https://jarcasting.com/artifacts/de.helwich.junit/junit-jasmine-runner/
implementation ("de.helwich.junit:junit-jasmine-runner:0.1.4")
'de.helwich.junit:junit-jasmine-runner:jar:0.1.4'
<dependency org="de.helwich.junit" name="junit-jasmine-runner" rev="0.1.4">
  <artifact name="junit-jasmine-runner" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.helwich.junit', module='junit-jasmine-runner', version='0.1.4')
)
libraryDependencies += "de.helwich.junit" % "junit-jasmine-runner" % "0.1.4"
[de.helwich.junit/junit-jasmine-runner "0.1.4"]

Dependencies

compile (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

JUnit Jasmine Runner

Features

  • Runs Jasmine Tests with JUnit
  • Integrates with Eclipse, IntelliJ, Maven etc.
  • Uses Java Nashorn JavaScript interpreter
  • Optional Browser Support (with Envjs)
  • Supports Jasmine 2

Requirements

  • Java 8

Usage

Add project dependency. E.g if you use maven:

<dependency>
  <groupId>de.helwich.junit</groupId>
  <artifactId>junit-jasmine-runner</artifactId>
  <version>0.1.4</version>
  <scope>test</scope>
</dependency>

Or download from here.

Add Java class (below src/test/java for maven) which name ends with “Test”. The class specifies the JavaScript test and source files:

import de.helwich.junit.*;
import org.junit.runner.RunWith;

@RunWith(JasmineTestRunner.class)
@JasmineTest(
    src =  { "Song", "Player" },
    test = { "SpecHelper", "PlayerSpec" },
    browser = false
)
public class RunJasmineTest {}

By default the tests are expected to be below src/test/js and the sources below src/main/js. The default file suffix is .js.

Release

mvn clean deploy -P release
cd target
jar -cvf bundle.jar junit-jasmine-runner-*
  • login here
  • Build Promotion > Staging Upload > Artifact Bundle > Select Bundle to Upload
  • Build Promotion > Staging Repositories > Select > Release

ToDo

  • optionally emit HTML runner

Versions

Version
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0