<commit_before>suite('Color', function() {

  // p5 instance
  var myp5 = new p5(function( p ) {
    p.setup = function() {};
    p.draw = function() {};
  });

  suite('p5.prototype.colorMode', function() {
    var colorMode = myp5._colorMode;
    suite('colorMode(RGB)', function() {
      test('should be a function', function() {
        assert.ok(colorMode);
      });
      test('should set mode to HSB', function() {
        myp5.colorMode(myp5.HSB);
        assert.equal(myp5._colorMode, myp5.HSB);
      });
    });
  });

});<commit_msg>update color mode mocha test<commit_after>suite('Color', function() {

  // p5 instance
  var myp5 = new p5(function( p ) {
    p.setup = function() {};
    p.draw = function() {};
  });

  suite('p5.prototype.colorMode', function() {
    var colorMode = myp5._colorMode;
    suite('colorMode(RGB)', function() {
      test('should be a function', function() {
        assert.ok(colorMode);
      });

      test('should set mode to RGB', function() {
        myp5.colorMode(myp5.RGB);
        assert.equal(myp5._colorMode, myp5.RGB);
      });

      test('should correctly set color RGB maxes', function() {
        assert.deepEqual(myp5._colorMaxes[myp5.RGB], [255, 255, 255, 255]);
        myp5.colorMode(myp5.RGB, 1, 1, 1);
        assert.deepEqual(myp5._colorMaxes[myp5.RGB], [1, 1, 1, 255]);
        myp5.colorMode(myp5.RGB, 1);
        assert.deepEqual(myp5._colorMaxes[myp5.RGB], [1, 1, 1, 1]);
        myp5.colorMode(myp5.RGB, 255, 255, 255, 1);
        assert.deepEqual(myp5._colorMaxes[myp5.RGB], [255, 255, 255, 1]);
        myp5.colorMode(myp5.RGB, 255);
      });

      test('should set mode to HSL', function() {
        myp5.colorMode(myp5.HSL);
        assert.equal(myp5._colorMode, myp5.HSL);
      });

      test('should correctly set color HSL maxes', function() {
        assert.deepEqual(myp5._colorMaxes[myp5.HSL], [360, 100, 100, 1]);
        myp5.colorMode(myp5.HSL, 255, 255, 255);
        assert.deepEqual(myp5._colorMaxes[myp5.HSL], [255, 255, 255, 1]);
        myp5.colorMode(myp5.HSL, 360);
        assert.deepEqual(myp5._colorMaxes[myp5.HSL], [360, 360, 360, 360]);
        myp5.colorMode(myp5.HSL, 360, 100, 100, 1);
        assert.deepEqual(myp5._colorMaxes[myp5.HSL], [360, 100, 100, 1]);
      });

      test('should set mode to HSB', function() {
        myp5.colorMode(myp5.HSB);
        assert.equal(myp5._colorMode, myp5.HSB);
      });

      test('should correctly set color HSB maxes', function() {
        assert.deepEqual(myp5._colorMaxes[myp5.HSB], [360, 100, 100, 1]);
        myp5.colorMode(myp5.HSB, 255, 255, 255);
        assert.deepEqual(myp5._colorMaxes[myp5.HSB], [255, 255, 255, 1]);
        myp5.colorMode(myp5.HSB, 360);
        assert.deepEqual(myp5._colorMaxes[myp5.HSB], [360, 360, 360, 360]);
        myp5.colorMode(myp5.HSB, 360, 100, 100, 1);
        assert.deepEqual(myp5._colorMaxes[myp5.HSB], [360, 100, 100, 1]);
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.17483936422049373, 'fraction_numerical': 0.0835306053432533, 'mean_word_length': 2.7729591836734695, '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': '1751678', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1105, 'n_words': 208}