I just started looking and found an issue with the TestBox component in CF9.
I put an empty component testboxTest.cfc in a folder in testbox called tests and tried to exectue a runner against that component.
Here’s the Runner.cfm: It’s essentially the sample for a single cfc bundle in the documentation.
<cfset runner = new testbox.system.testing.Testbox(“testbox.tests.testboxTest”)> #runner.run()#
As the runner spins up it eventually calls into BaseSpec.cfc which constructs a suite struct on line 81. Since it creates to no-op lamdbas, it chokes on CF9.
Commenting out the body of the suite struct leads to a successful page load and test run for a bundle of one cfc.
I’m running through the Prime Factors kata and have gotten an interesting error. Here’s a way to expose the error. 2.0 is not considered equal to 2 when it is an element in an array.
function testFunction() {
var result = myFunction();
$assert.isEqual(result[1], 2); //Passes
$assert.isEqual(result[2], 2); //Passes
$assert.isEqual(result, [2,2]); //Fails ‘Expected [[2, 2]] but received [[2, 2.0]]’
}
At the java level, the comparison between an int and a double would pass because they have comparison semantics that allow it (a delta parameter might be required to account for a certain amount of floating point error but 4.0/2.0 should be a pretty accurate 2.0).
The only thing that I could think was to do an element by element comparision using isEqual on each element. That worked for me locally. I can attach a diff, but you could probably write that length check and for loop faster than I could paste it.