<commit_before>buster.testCase('superstore', {
  "setUp": function() {
    localStorage.clear();
  },
  "Should be able to set and get data against a key": function() {
    Superstore.set('quay', 'val you', function() {
      Superstore.get('quay', function(err, value) {
        assert.equals('val you', value);
      }); 
    });
  },
  "Should be able to read things (twice) from local storage": function() {
    localStorage.keyTwo = 3884;
    Superstore.get('keyTwo', function(err, value) {
      assert.equals(3884, value);
    });
    Superstore.get('keyTwo', function(err, value) {
      assert.equals(3884, value);
    });
  },
  "Should be able to unset things": function() {
    localStorage.keyThree = "Hello";
    Superstore.unset('keyThree', function() {
      assert.equals(undefined, localStorage.keyThree);
    });
  },
  "Shouldn't need to provide a set callback to set": function() {
    Superstore.set("keyFour", "OK");
    assert.equals("\"OK\"", localStorage.keyFour);
  },
  "Shouldn't need to provide a set callback to unset": function() {
    localStorage.keyFifth = true;
    Superstore.unset('keyFifth');
    assert.equals(undefined, localStorage.keyFifth);
  },
  "Getting an unset key should return a nully value": function() {
    Superstore.get("keySixth", function(err, value) {
      assert.equals(value, undefined);
    });
  },
  "Should json encode and decode objects": function() {
    var obj = {
      test: [1,4,6,7]
    };
    Superstore.set('keySeventh', obj, function() {
      assert.equals(JSON.stringify(obj), localStorage.keySeventh);
    });
  }<commit_msg>Check set callbacks are firing<commit_after>buster.testCase('superstore', {
  "setUp": function() {
    localStorage.clear();
  },
  "Should be able to set and get data against a key": function() {
    Superstore.set('quay', 'val you', function() {
      Superstore.get('quay', function(err, value) {
        assert.equals('val you', value);
      }); 
    });
  },
  "Should be able to read things (twice) from local storage": function() {
    localStorage.keyTwo = 3884;
    Superstore.get('keyTwo', function(err, value) {
      assert.equals(3884, value);
    });
    Superstore.get('keyTwo', function(err, value) {
      assert.equals(3884, value);
    });
  },
  "Should be able to unset things": function() {
    localStorage.keyThree = "Hello";
    Superstore.unset('keyThree', function() {
      assert.equals(undefined, localStorage.keyThree);
    });
  },
  "Shouldn't need to provide a set callback to set": function() {
    Superstore.set("keyFour", "OK");
    assert.equals("\"OK\"", localStorage.keyFour);
  },
  "Shouldn't need to provide a set callback to unset": function() {
    localStorage.keyFifth = true;
    Superstore.unset('keyFifth');
    assert.equals(undefined, localStorage.keyFifth);
  },
  "Getting an unset key should return a nully value": function() {
    Superstore.get("keySixth", function(err, value) {
      assert.equals(value, undefined);
    });
  },
  "Should json encode and decode objects": function() {
    var obj = {
      test: [1,4,6,7]
    };
    Superstore.set('keySeventh', obj, function() {
      assert.equals(JSON.stringify(obj), localStorage.keySeventh);
    });
  },
  "Set should fire a callback": function() {
    var spy = this.spy();
    Superstore.set('keyNinth', 'A', spy);
    assert.called(spy);
  }
{'fraction_non_alphanumeric': 0.1599881270406649, 'fraction_numerical': 0.009498367468091422, 'mean_word_length': 3.3880208333333335, 'pattern_counts': {'":': 17, '<': 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': '2204352', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1062, 'n_words': 261}