Permalink
Commits on Oct 30, 2010
  1. Don't kill process on errors that we can pin to a test

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
    This goes back on: e509041 where I made
    runSuite kill the process when it encountered any errors.  Now it only
    does that when it encounters errors that it cannot figure out which
    tests caused them.  That will only happen in parallel mode.
    
    Why have worse results all the time when it is really only running in
    parallel that causes them?
  2. Make the arguements to run's callback more useful

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
  3. Make onTestDone match onSuiteDone with a status argument

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
  4. run suites in the order they are listed (console runner)

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
  5. Combine all suite finishing events into one event with a 'status' arg…

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
    …ument
    
    This simplifies the API to:
    
    onTestStart
    onTestDone
    onSuiteDone
  6. Format console runners summary line differently

    Benjamin Thomas
    Benjamin Thomas committed Oct 30, 2010
Commits on Oct 29, 2010
  1. Make it so if a test calls finish twice we get an error

    Benjamin Thomas
    Benjamin Thomas committed Oct 29, 2010
  2. Update documentation and comments

    Benjamin Thomas
    Benjamin Thomas committed Oct 29, 2010
  3. Update tests to put run command at top, and use new style

    Benjamin Thomas
    Benjamin Thomas committed Oct 29, 2010
    Doing things this way prevents the file being run from being run twice.
  4. Improve arguments for async_testing.run and command line flags

    Benjamin Thomas
    Benjamin Thomas committed Oct 29, 2010
    Now async_testing.run can take any number of arguments, which can be any
    one of:
    
    + string
    + options object
    + ARGV array
    
    The last argument can still be a callback.
    
    The order matters, latter settings override earlier ones. now you can
    
    run a file:
      async_testing.run('myFile.js');
    
    add defaults:
      async_testing.run({parallel: true}, 'myFile.js');
    
    use command line arguments:
      async_testing.run(process.ARGV);
    
    use command line arguments with defaults:
      async_testing.run({parallel: true}, process.ARGV);
    
    overwrite command line arguments:
      async_testing.run(process.ARGV, {parallel: true});
    
    I also worked on improving the built-in option parser a little bit and
    testing it (my tests are not comprehensive yet).  I'm beginning to think
    maintaining a built-in option parser is a pain and that we should bundle
    one.
Commits on Oct 28, 2010
  1. Remove suiteSetup/suiteTeardown from test toSting in wrap

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
  2. Fix wrong requires in flow tests

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
  3. Add todo list, pretty rough at the moment

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
  4. Readd watchFile functionallity to web runner

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
  5. Work on console runner output and update some tests

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
  6. Further work on parallel suite execution

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
    Handle load errors of files, and make web-runner use new system.
  7. Reorganize tests a little bit

    Benjamin Thomas
    Benjamin Thomas committed Oct 28, 2010
Commits on Oct 27, 2010
  1. Rename a few event callback functions

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
    onSuiteDone     -> onSuiteCompleted
    onError         -> onSuiteError
    onPrematureExit -> onSuiteExit
    
    This make it more obvious that each of these events ends the suite and
    that only one of them is called per suite.
  2. Make the expandFiles callback have an error argument

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
  3. Add runFile() method for running a suite file in a child process

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
    Preliminary support.  Still have to test more thoroughly and update the
    web runner to use the runFile method.
  4. Update docs and README

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
  5. Move documentation from READMe to HTML in 'docs' folder

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
  6. Fix trying to run the wrong file in bin/test-output.sh

    Benjamin Thomas
    Benjamin Thomas committed Oct 27, 2010
Commits on Oct 26, 2010
  1. Clean up code a little bit

    Benjamin Thomas
    Benjamin Thomas committed Oct 26, 2010
  2. Update 'flow' tests, add script for testing output

    Benjamin Thomas
    Benjamin Thomas committed Oct 26, 2010
Commits on Oct 25, 2010
  1. Update for sys -> util change

    Benjamin Thomas
    Benjamin Thomas committed Oct 25, 2010
Commits on Oct 24, 2010
  1. Add suiteSetup/suiteTeardown to wrap

    Benjamin Thomas
    Benjamin Thomas committed Oct 24, 2010
Commits on Oct 22, 2010
  1. Re-add setup/teardown functions

    Benjamin Thomas
    Benjamin Thomas committed Oct 22, 2010
    Re-add some of the functionallity that I removed in
    e509041.  Now instead of supplying a
    function for a test you can supply an array of functions.  The first
    and last functions in this array are considered setup and teardown
    functions respectively.  If the setup function was run, then no matter
    if the test passes or fails, the teardown function will be run no matter
    what.  You can do this multiple times, so instead of supply an array of
    length 3 you can do one of length 5.  In that case the second function
    will only be run if the first one completes successfully, and the the
    third the second.  However, the fourth (second to last) will be run no
    matter what if the second was run and the last will be run no matter
    what if the first was run.
    
    This sounds complicated, but I don't anticipate anyone using this raw
    API.  It is mainly for the wrap function to use for the suiteSetup,
    suiteTeardown, setup and teardown functions.  This way you know for sure
    that your teardown and suiteTeardown will be run which wasn't possible
    before (suiteTeardown doesn't exist yet). This would arise if a test
    failed then there was no way to make sure a teardown was run.  Which
    sort of defeats the whole point of a teardown.
Commits on Oct 21, 2010
  1. Update web runner to work with new error API.

    Benjamin Thomas
    Benjamin Thomas committed Oct 21, 2010
Commits on Oct 9, 2010
  1. Make unexpected errors kill the process

    Benjamin Thomas
    Benjamin Thomas committed Oct 9, 2010
    I realized I was going to A LOT of effort to catch and report on
    run-time errors in code, and this was majorly complicating the way the
    whole library was being written.
    
    But I figure if there is an error, it is something that is a show
    stopper anyway, and you need to be notified about it immediately.
    
    Suite runners will be notified of the error, right before the process
    exits, so they can say what happened.
    
    If you still really want errors to be caught, use the wrap function to
    add a setup to all your tests and then set the uncaughtExceptionHandler
    in the test.  You'll have to run the suite in parallel then.
  2. Beginning support for built-in setup/teardown functions

    Benjamin Thomas
    Benjamin Thomas committed Oct 9, 2010
    Basically, you can't do them properly without building them in.  The API
    will probably change.
Commits on Oct 8, 2010
  1. Restructer how tests are ran

    Benjamin Thomas
    Benjamin Thomas committed Oct 8, 2010
    This change cleans up the test running code quite a bit.  Now (more
    logically) whenever a test finishes, whether by assertion failure, error
    or a `test.finish()` call, it all goes through the `testFinished`
    function.  Before errors were handled differently.
    
    We also simplify the event API for writing test runners.  Before we had
    4 different kind of result objects, now we have 2 (mostly).  I know this
    is a backwards incompatible change, but it isn't to the public API, but
    to the test runner API which I think I am the only one doing.  So, if
    this is breaking your code, please let me know.
    
    We restructred as a preface to proper setup/teardown support, which hopefully
    I'll get to tonight.