-
-
Save jamiejackson/ac96a01348db4026872ab50030bcce02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component | |
extends="testbox.system.BaseSpec" | |
{ | |
/******************** "Global" setup/teardown *****************************/ | |
/** | |
* @hint Executes before the *set* of all tests. | |
*/ | |
function beforeAll(){ | |
variables.thingsToTest = ["foo","bar","baz"]; | |
} | |
/** | |
* @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() { | |
expect(thing).toBe(thing); | |
}); | |
} | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable [THINGSTOTEST] doesn't exist | |
Stacktrace The Error Occurred in | |
test.cfc: line 40 | |
38: describe("Example suite", function(){ | |
39: debug(structKeyList(variables)); | |
40: for ( var thing in thingsToTest ) { | |
41: it( thing & "test" , function() { | |
42: expect(thing).toBe(thing); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment