Skip to content

Generates/executes a jasmine spec runner for an AMD-compliant project

Notifications You must be signed in to change notification settings

abirmingham/gradle-jasquire-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generates/executes a jasmine spec runner for an AMD-compliant project

Use

buildscript {
    dependencies {
        classpath 'com.github.abirmingham:gradle-jasquire-plugin:1.3'
    }
}

apply plugin: 'jasquire'

Configure

jasquire {
    // Required
    requireJSBaseUrl    = "$projectDir/src/main/webapp/js/main";
    requireJS           = "src/main/webapp/js/vendor/require/require-jquery.js";
    requireJSConfig     = "src/main/webapp/js/util/commonConfig.js";
    jsSourcesDir        = "src/main/webapp/js";
    
    // Optional
    jsSpecsDir         = "src/test/javascript";
    reportTargetDir    = "build/reports/jasquire";
    htmlRunner         = "build/reports/jasquire/AllSpecsRunner.html";
    consoleOut         = "build/reports/jasquire/jasquire.out";
    failBuildOnFailure = true;
}

Profit

All files in jsSpecsDir will be collected and run automatically as part of the build's test task. Additionally, the 'jasquireMain' and 'jasquireTest' tasks may be run independently. Finally, the htmlRunner can be opened in a browser for debugging purposes, and changes to specs/source will be reflected automatically.

Credit

Matías Rodríguez

Serials Solutions

About

Generates/executes a jasmine spec runner for an AMD-compliant project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages