Skip to content

Releases: titulus/test.it

quering window fix

11 Mar 07:50
Compare
Choose a tag to compare

fix bug with quering window crashes in nodejs

Trace fix

24 Oct 04:25
Compare
Choose a tag to compare

fix bug in getTrace with wrong filter

Nodejs compatible

13 Oct 16:39
Compare
Choose a tag to compare

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

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

15 Aug 17:58
Compare
Choose a tag to compare

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
  • fixes
    • fix time recalculation in test.done()
    • fix many grammar errors #1
  • 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

10 Aug 13:07
Compare
Choose a tag to compare
  • Update README.md
  • change folders
    • remove test
    • add example instead
  • grammar fixes
  • fix bug in safari, with error.stack

bug fixes + completed wiki

06 Aug 10:58
Compare
Choose a tag to compare

Fix bugs:

  • i variable
  • tests errors
  • updating root in test.it() and some other tests

Fix and change structure in readme

Complete wiki

fix alot of bugs

04 Aug 19:17
Compare
Choose a tag to compare

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

04 Aug 15:16
Compare
Choose a tag to compare

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()