Fix JavaScript unit tests for 2.0.x.

Review Request #6443 — Created Oct. 14, 2014 and submitted

Information

Review Board
release-2.0.x
ec75820...

Reviewers

A lot of the optimizations made resulted in broken unit tests, due to
various tests not accounting for throttled results.

We now optimistically disable throttling where possible (for cases where
the _.throttle call isn't part of the object's prototype) and do proper
async testing in the other cases.

Unit tests pass.

Description From Last Updated

Shouldn't this just be return cb;?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/js/tests.html
        reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/js/tests.html
        reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/templates/js/tests.html (Diff revision 1)
     
     
     
     
    Show all issues

    Shouldn't this just be return cb;?

    1. Yeah. I was mimicking what _.throttle was doing, but that's silly in this case.

  3. 
      
chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/js/tests.html
        reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
        reviewboard/static/rb/js/views/reviewBoxView.js
        reviewboard/templates/js/tests.html
        reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (a6dc237)