Jasmine Archetype

An archetype to get started with JavaScript unit testing with Jasmine.

License

License

Categories

Categories

ASM Application Layer Libs Bytecode Manipulation
GroupId

GroupId

com.github.searls
ArtifactId

ArtifactId

jasmine-archetype
Last Version

Last Version

2.0
Release Date

Release Date

Type

Type

jar
Description

Description

Jasmine Archetype
An archetype to get started with JavaScript unit testing with Jasmine.
Project URL

Project URL

http://github.com/searls/jasmine-archetype
Source Code Management

Source Code Management

https://github.com/searls/jasmine-archetype

Download jasmine-archetype

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

jasmine-archetype

A Maven Archetype for getting started with Jasmine JavaScript testing

This archetype is designed to get you up-and-running quickly with the jasmine-maven-plugin.

Usage

Create a new Maven project that's set up to use jasmine-maven-plugin, complete with example specs.

mvn archetype:generate \
  -DarchetypeGroupId=com.github.searls \
  -DarchetypeArtifactId=jasmine-archetype \
  -DarchetypeVersion=RELEASE \
  -DgroupId=com.acme \
  -DartifactId=my-jasmine-project \
  -Dversion=0.0.1-SNAPSHOT
  -DjasminePluginVersion=RELEASE

If you're on Windows or if your shell doesn't like the newlines above, here's the same command in a single line:

mvn archetype:generate -DarchetypeGroupId=com.github.searls -DarchetypeArtifactId=jasmine-archetype -DarchetypeVersion=RELEASE -DgroupId=com.acme -DartifactId=my-jasmine-project -Dversion=0.0.1-SNAPSHOT -DjasminePluginVersion=RELEASE

This will create a project that looks something like this:

|-- pom.xml
`-- src
    |-- main
    |   `-- javascript
    |       `-- element_mover.js
    `-- test
        `-- javascript
            `-- element_mover_spec.js

To build the project and verify the Jasmine specs are executing, switch to the new project directory and start the server:

cd my-jasmine-project && mvn jasmine:bdd

Then you should be able to go to http://localhost:8234 in a browser and watch your specs execute.

Adding the archetype catalog to m2Eclipse

To create a new project from this archetype from within Eclipse, its archetype catalog will need to be added. The process goes something like this (and hardly seems worth the effort over doing it from command line):

  1. File -> New Project... -> Maven Project
  2. Click 'Next'
  3. Select the jasmine-archetype and continue by clicking 'Next'
  4. Make yourself a sandwich or otherwise reward yourself

Versions

Version
2.0
2.0-beta-02
2.0-beta-01
2.0-alpha-01
1.3.1.6
1.3.1.5
1.3.1.4
1.3.1.3
1.3.1.2
1.3.1.1
1.3.1.0