Test("Basic syntax", Test.ANY( ), function() {
// assertions, if any, go here
});
Parameters
No parameters.
Return values
Value
Type
Notes
API Version
<mode>
Object
The mode object is associated with the unit test defined in the same Test() invocation.
1.0
Effect on test
Unlike all the other Test Modes, Test.ANY( ) does not affect the Unit Test function outcome in any way.
It doesn't matter how many results are generated within the test, or even if there are no results. All that matters is that any Test Assertions pass and that no test-failing Test Signals are generated.
The test is treated as synchronous and its pass/fail state will be determined as soon as the unit test function is finished processing.
Note: If you know how many results a test will generate, it's recommended to use Test.EXPECT( ) instead.
Fail conditions
The unit test will be deemed to have failed if any of the following occur:
similarTo( ) — A deep similarity checking assertion...
notSimilarTo( ) — A deep dissimilarity spotting assertion...
Test Signals — Signals are used to prematurely terminate Unit Tests...
REQUIRE( ) — Check whether a test or group of tests have passed. If the requirement fails, a RequireSignal will be sent which terminates the current test and marks it as failed.
ABORT( ) — Aborts the current test, marking it as failed in the process...
FINISH( ) — Terminates the test as if it had finished normally...