Brent
05/21/2024, 3:50 PMaliaspooryorik
box install testbox
aliaspooryorik
aliaspooryorik
Brent
05/21/2024, 4:10 PMaliaspooryorik
aliaspooryorik
box install testbox
in your mounted app root.Brent
05/21/2024, 4:17 PM.:/app
so all code should be mounted to the container (I can make changes, refresh the page in browser and see the updated app running from the container)aliaspooryorik
aliaspooryorik
Brent
05/21/2024, 4:20 PMaliaspooryorik
box install
after pulling which will mean they get the latest and greatest packages (commandbox has a package manager if you are familiar with something like npm)aliaspooryorik
box install textbox
it'll create a box.json
file which tracks dependancies and versions etc, which is how the box install
knows what to go and grab.aliaspooryorik
Brent
05/21/2024, 4:28 PMaliaspooryorik
testbox
directory, we don't have a node_modules
folder in cfml and like you do in node.Brent
05/21/2024, 4:30 PMBrent
05/21/2024, 4:31 PMaliaspooryorik
aliaspooryorik
aliaspooryorik
component extends="testbox.system.BaseSpec" {
/*********************************** LIFE CYCLE Methods ***********************************/
// executes before all suites+specs in the run() method
function beforeAll(){
}
// executes after all suites+specs in the run() method
function afterAll(){
}
/*********************************** BDD SUITES ***********************************/
function run(){
feature( "Given-When-Then test language support", function(){
scenario( "I want to be able to write tests using Given-When-Then language", function(){
given( "I am using TestBox", function(){
when( "I run this test suite", function(){
then( "it should be supported", function(){
expect( true ).toBe( true );
} );
} );
} );
} );
} );
}
}
aliaspooryorik
aliaspooryorik
Brent
05/21/2024, 4:33 PMaliaspooryorik
import
so you can do that, it's more like Java import than commonjs import thoughaliaspooryorik
Brent
05/21/2024, 4:36 PMaliaspooryorik
component extends="testbox.system.BaseSpec" {
function run( testResults, testBox ) {
describe( "config bean", function() {
it( "should do stuff", function() {
var sut = new model.Config();
expect( sut.stuff() ).toBe( true );
}
}
}
}
aliaspooryorik
foundeo
foundeo
aliaspooryorik
aliaspooryorik
Brent
05/21/2024, 4:46 PMaliaspooryorik
Brent
05/21/2024, 4:46 PMaliaspooryorik
aliaspooryorik
Brent
05/21/2024, 4:47 PMaliaspooryorik
foundeo
services/calc.cfc
with one function add(x, y)
https://github.com/foundeo/cfml-ci-examples/blob/master/tests/specs/CalcTest.cfcfoundeo
var calc = new services.calc()
CF is looking at the root of the site for a folder called services with a cfc file called calc.cfc OR and it will check this first, a mapping named servicesaliaspooryorik
<cftag>
heavy!)Brent
05/21/2024, 4:50 PMaliaspooryorik
Brent
05/21/2024, 4:53 PMaliaspooryorik