Skip to content

Instantly share code, notes, and snippets.

@jamiejackson
Created May 3, 2016 21:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiejackson/2d7ca7ace271128ac9e70aa046061b9d to your computer and use it in GitHub Desktop.
Save jamiejackson/2d7ca7ace271128ac9e70aa046061b9d to your computer and use it in GitHub Desktop.
component
extends="testbox.system.BaseSpec"
{
/******************** "Global" setup/teardown *****************************/
config();
function config(){
variables.thingsToTest = ["foo","bar","baz"];
}
/**
* @hint Executes before the *set* of all tests.
*/
function beforeAll(){}
/**
* @hint Executes after the *set* of all tests.
*/
function afterAll(){}
/*========================================================================*/
function run( testResults, testBox ){
/*
* @hint: Executes before each and every test.
*/
beforeEach(function( currentSpec ) {
// do something
});
/*
* @hint: Executes after each and every test.
*/
afterEach(function( currentSpec ) {
// do something
});
describe("Example suite", function(){
for ( var thing in thingsToTest ) {
it( title=thing & "test", data={thing=thing}, body=function() {
var thing = data.thing;
writeLog(thing & " start");
expect(writeLog(thing) & thing).toBe(thing);
writeLog(thing & " stop");
});
}
});
}
}
@lmajano
Copy link

lmajano commented May 4, 2016

body=function( data )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment