Skip to content

Instantly share code, notes, and snippets.

@jamiejackson
Created May 3, 2016 20:11
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/6feff13e529645922f5a1feb58c265e0 to your computer and use it in GitHub Desktop.
Save jamiejackson/6feff13e529645922f5a1feb58c265e0 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(){
debug(variables);
for ( var thing in thingsToTest ) {
it( thing & "test" , function() {
writeLog(thing & " start");
expect(writeLog(thing) & thing).toBe(thing);
writeLog(thing & " stop");
});
}
});
}
}
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz start"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz stop"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz start"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz stop"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz start"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz"
"INFO","http-nio-8888-exec-7","05/03/2016","15:07:51","","baz stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment