<commit_before>// ==========================================================================
// Project:  SproutCore Runtime
// Copyright: ©2011 Strobe Inc. and contributors.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

module('system/run_loop/next_test');

test('should invoke immediately on next timeout', function() {

  var invoked = false;
  
  stop();
  
  SC.run(function() {
    SC.run.next(function() { invoked = true; });
  });

  equals(invoked, false, 'should not have invoked yet');
  
  
  setTimeout(function() {
    start();
    equals(false, true, 'FAIL');
    equals(invoked, true, 'should have invoked later item');
  }, 20);
  
});<commit_msg>The previous QUnit fix exposed some (wildly) failing tests. true should *not* equal false.<commit_after>// ==========================================================================
// Project:  SproutCore Runtime
// Copyright: ©2011 Strobe Inc. and contributors.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

module('system/run_loop/next_test');

test('should invoke immediately on next timeout', function() {

  var invoked = false;
  
  stop();
  
  SC.run(function() {
    SC.run.next(function() { invoked = true; });
  });

  equals(invoked, false, 'should not have invoked yet');
  
  
  setTimeout(function() {
    start();
    equals(invoked, true, 'should have invoked later item');
  }, 20);
  
});
{'fraction_non_alphanumeric': 0.3120978120978121, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 4.456140350877193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3138778', 'n_tokens_mistral': 425, 'n_tokens_neox': 393, 'n_words': 116}