Releases: titulus/test.it
Releases · titulus/test.it
quering window fix
Trace fix
Nodejs compatible
Huge changes
In Core
- Strategy pattern was used for implementing various types of outputs.
- Add file test.it-firebug.js as output-to-browser strategy
- Add repo test.it-nodejs as output-to-CLI strategy
- Added
.printer( printerStrategy )
method, which allows you to switch default output strategy. - Added
.print([printerStrategy])
- which replaced.done
(deprecated) and perform strategy switching on-the-fly.
In API
- deprecate:
.type()
->.is()
.types()
->.are()
.done()
->.print()
.time
->.addTime()
.root
->.getRoot()
.exclude
get alias.x
Some other fixes
- Added ability to correctly compare jQuery objects
- Don't highlight zero values into group testing statistics to allow better recognition of information
- remove extra comments
- make
.result()
can be called ctraight from test object. It can be used in continius integration.
Async tests and particular output
Changelog
- changes in code
- serious refactor, changed technique of nesting and chaining
- provide executing in non-window enviroment (like node.js)
- made
.done()
chain-closer to provide output a particular group or test
- additions
- chain-link
.addTrace(level)
- chain-prep
.time
to calculate time spended on test - chain-prep
.exclude
which made test/group unpushable into stack of current level group
- chain-link
- fixes
- fix time recalculation in
test.done()
- fix many grammar errors #1
- fix time recalculation in
- wiki updated
Particular outout
Output a particular group or test availible from now
example:
test.done(); // outputs the root
test.group('first group',function(){
...
test.done(); // outputs the first group
});
test.group('first group').done(); // outputs the first group
test.it(someThing).done(); // outputs the test
Async tests
Async tests availible from now
To test the async functional use the following structures
asyncFunction(); // that function will fill asyncVariable and asyncResult
// testing group of tests
setTimeout(function () {
test.group('async tests',function(){
test.it(asyncResult);
test.it(asyncVariable);
}).done(); // .done() is required to output result
}, 2000); // test group will be launched in 2 seconds
// testing single tests
setTimeout(function () {
test.it(asyncVariable).done(); // .done() is required to output result
}, 2000); // test will be launched in 2 seconds
Tests and groups in setTimeout function will be run in root
scope. For running in some group scope use group nesting.
setTimeout(function () {
test.group('group name')
.group('async tests',function(){
test.it(asyncResult);
test.it(asyncVariable);
}).done();
}, 2000);
To prevent pushing results in stack of root
use .exclude
// testing group of tests
setTimeout(function () {
test.exclude.group('async tests',function(){
test.it(asyncResult);
test.it(asyncVariable);
}).done(); // test group will not be pushed into root stack
}, 2000);
// testing single tests
setTimeout(function () {
test.exclude.it(asyncVariable).done(); // test will not be pushed into root stack
}, 2000);
fix bug in safari
- Update README.md
- change folders
- remove test
- add example instead
- grammar fixes
- fix bug in safari, with error.stack
bug fixes + completed wiki
Fix bugs:
i
variable- tests errors
- updating
root
intest.it()
and some other tests
Fix and change structure in readme
Complete wiki
fix alot of bugs
realized next features:
tests:
test.it( value )
test.it( value1, value2 )
test.them( values )
test.type( value, type )
test.types( values [, type] )
groups - test.group( name, function(){ ... } )
Chain links
.comment( text )
.callback( funcIfpass, funcIffail, funcIferror)
Chain closers
.result()
.arguments()
Chaining
test.it(some)
.comment('comment to test')
.callback(function(){alert('test has been passed')})
.arguments(); // -> [some]
test.group('group', function(){ ... })
.comment('comment to group')
.result(); // -> true/false
Nesting:
test.group('first group',function(){
...
test.group('second group', function(){
...
});
...
});
test.group('first group').group('second group',function(){ ... });
Some features:
test.typeof( entity )
test.trace()
All basic functional
realized next features:
tests:
test.it( value )
test.it( value1, value2 )
test.them( values )
test.type( value, type )
test.types( values [, type] )
groups - test.group( name, function(){ ... } )
Chain links
.comment( text )
.callback( funcIfpass, funcIffail, funcIferror)
Chain closers
.result()
.arguments()
Chaining
test.it(some)
.comment('comment to test')
.callback(function(){alert('test has been passed')})
.arguments(); // -> [some]
test.group('group', function(){ ... })
.comment('comment to group')
.result(); // -> true/false
Nesting:
test.group('first group',function(){
...
test.group('second group', function(){
...
});
...
});
test.group('first group').group('second group',function(){ ... });
Some features:
test.typeof( entity )
test.trace()