Blog

TestBox v2.4.0 Released!

Luis Majano November 18, 2016

Spread the word

Luis Majano

November 18, 2016

Spread the word


Share your thoughts

What's New With 2.4.0

TestBox 2.4.0 is a minor release with some great new functionality and tons of fixes. This release has been a great community effort as many people in the community contributed to its release. Special thanks to Eric Peterson, Joe Gooch and Sean Corfield for their additions, testing and contributions.

New toSatisfy matcher

This new matcher is thanks to Sean Corfield. It allows you to create your own closure that will evaluate the expectation and then decide if it passes the given truth test.

it( "can satisfy truth tests", function(){

    expect( 1 ).toSatisfy( function( num ){ return arguments.num > 0; } );

    expect( 0 ).notToSatisfy( function( num ){ return arguments.num > 0; } );

});

New expectAll() collection expectation

Sean was busy in this release and provided us with this awesome feature in which you can call on a new expectAll() and pass either an array or struct. TestBox will then iterate for you and call all the chained matchers upon the collection items.

it( "can test a collection", function(){
    expectAll( [2,4,6,8] ).toSatisfy( function(x){ return 0 == x%2; });
    expectAll( {a:2,b:4,c:6} ).toSatisfy( function(x){ return 0 == x%2; });

    // and we can chain matchers
    expectAll( [2,4,6,8] )
        .toBeGTE( 2 )
        .toBeLTE( 8 );
});

New mintext Reporter

This new reporter is to enhance console based runners in order for the report to be more legible.

New JSON Matchers & Assertions

You can now use a toBeJSON() matcher or a $assert.isJSON assertion.

No more runRemote

You no longer need to pass ?method=runRemote in the URL when executing a test bundle via the URL. This will automatically be added for you.

New Fluent API for Testing Declarations

Thanks to Joe Gooch you can now use the new methods in the TestBox cfc

  • addDirectory()
  • addDirectories()
  • addBundles()

You can chain them as you see fit and they will aggregate the specs collected.

Release Notes

Here is the full release notes for this release

Bugs

  • [TESTBOX-169] - discover if fail origin exists in errors and failures, else ignore as it causes issues
  • [TESTBOX-170] - Custom reporter passed as CFC instance doesn't work

New Features

  • [TESTBOX-171] - New mintext reporter
  • [TESTBOX-172] - new matcher toBeJSON and new assertion isJSON
  • [TESTBOX-175] - No need to pass method=runRemote anymore on spec runners, defaults now
  • [TESTBOX-176] - Implements fluent API - addDirectory,addBundles,addDirectories on TestBox Core

Improvements

  • [TESTBOX-168] - runRemote operations are not setting the default response to HTML, so wddx takes over
  • [TESTBOX-173] - Add toSatisfy( predicate ) matcher
  • [TESTBOX-174] - Add expectAll() to make it easier to work with collections

Add Your Comment

Recent Entries

ColdBox 7.2.0 Released

ColdBox 7.2.0 Released

ColdBox, a widely used development platform for ColdFusion (CFML), has unveiled version 7.2. Packed with compelling new features, bug fixes, and enhancements, this release is designed to empower developers by boosting productivity, refining scheduled task capabilities, and enhancing the overall reliability and efficiency of application development. This article will delve into the key highlights of ColdBox 7.2 and elucidate how these advancements can positively impact developers in their daily coding endeavors.

Luis Majano
Luis Majano
November 20, 2023
Into the Box 2023 Series on CFCast

Into the Box 2023 Series on CFCast

Excitement is in the air as we unleash the highly anticipated ITB 2023 series exclusively for our valued CFCast subscribers – and the best part? It's FREE for CFCast members! Now is the perfect time if you haven't joined the CFCast community yet. Plus, we've got an incredible End-of-Year deal that's too good to miss

Maria Jose Herrera
Maria Jose Herrera
November 20, 2023
Ortus Deals are Finally Here!

Ortus Deals are Finally Here!

The much-anticipated Ortus End-of-the-Year Sale has arrived, and it's time to elevate your development experience! Whether you're a seasoned developer, a tech enthusiast, or someone on the lookout for top-notch projects, Ortus has something special in store for you. Brace yourself for incredible discounts across a wide array of products and services, including Ortus annual events, books, cutting-edge services, and more.

Maria Jose Herrera
Maria Jose Herrera
November 15, 2023