<commit_before>// ??: Set - clear
// To do: make all tests pass, leave the assert lines unchanged!

describe('`clear()` removes all elements from a Set object.', function(){

  let set;
  beforeEach(() => set = new Set());

  it('`set.size` becomes 0', function() {
    set.add('one').add(2);
    set.clear();

    var expectedSize;
    assert.equal(set.size, expectedSize);
  });

  it('the iterator `set.entries()` will not contain any items', function() {
    set.add('one').add(2);
    
    const {done} = set.entries().next();
    assert.equal(done, true);
  });
  
  it('any call to `set.has()` returns false', function() {
    set.add('one').add(2);
    
    set.clear;
    
    assert.deepEqual(set.has(2), false);
  });
  
  it('returns `undefined`', function() {
    var expectedReturn = true;
    assert.equal(set.clear(), expectedReturn);
  });
  
});
<commit_msg>From simple to more complex.<commit_after>// ??: Set - clear
// To do: make all tests pass, leave the assert lines unchanged!

describe('`clear()` removes all elements from a Set object.', function(){

  let set;
  beforeEach(() => set = new Set());

  it('`set.size` becomes 0', function() {
    set.add('one').add(2);
    set.clear();

    var expectedSize;
    assert.equal(set.size, expectedSize);
  });

  it('the iterator `set.entries()` will not contain any items', function() {
    set.add('one').add(2);
    
    set.clear;
    
    const {done} = set.entries().next();
    assert.equal(done, true);
  });
  
  it('any call to `set.has()` returns false', function() {
    set.add('one').add(2);
    
    assert.deepEqual(set.has(2), false);
  });
  
  it('returns `undefined`', function() {
    var expectedReturn = true;
    assert.equal(set.clear(), expectedReturn);
  });
  
});

{'fraction_non_alphanumeric': 0.1907187323146576, 'fraction_numerical': 0.005659309564233163, 'mean_word_length': 3.1116279069767443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1055351', 'n_tokens_mistral': 589, 'n_tokens_neox': 566, 'n_words': 150}