<commit_before>if (typeof window === 'undefined') {
  var expect = require('expect.js');
  var GeoJSON = require('../geojson');
}

describe('GeoJSON', function() {

  describe('#defaults', function(){
    it('exists as a public object of GeoJSON', function(){
      expect(typeof GeoJSON.defaults).to.eql('object');
    });

    it('is initially empty', function() {
      var count = 0;
      for(var key in GeoJSON.defaults) {
        if(GeoJSON.defaults.hasOwnProperty(key)) {
          count++;
        }
      }

      expect(count).to.be(0);
    });
  });

  describe('#parse', function(){
    var data;

    before(function() {
      // Sample Data
      data = [
        { name: 'Location A', category: 'Store', lat: 39.984, lng: -75.343, street: 'Market' },
        { name: 'Location B', category: 'House', lat: 39.284, lng: -75.833, street: 'Broad' },
        { name: 'Location C', category: 'Office', lat: 39.123, lng: -74.534, street: 'South' }
      ];
    });

    it('returns output with the same number of features as the input', function(){
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      expect(output.features.length).to.be(3);
    });

    it('doesn\'t include geometry fields in feature properties', function(){
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      output.features.forEach(function(feature){
        expect(feature.properties.lat).to.not.be.ok();
        expect(feature.properties.lng).to.not.be.ok();
      });
    });

    it('includes all properties besides geometry attributes when include or exclude isn\'t set', function() {
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      output.features.forEach(function(feature){
        expect(feature.properties.name).to.be.ok();<commit_msg>Added a few more expects<commit_after>if (typeof window === 'undefined') {
  var expect = require('expect.js');
  var GeoJSON = require('../geojson');
}

describe('GeoJSON', function() {

  describe('#defaults', function(){
    it('exists as a public object of GeoJSON', function(){
      expect(typeof GeoJSON.defaults).to.eql('object');
    });

    it('is initially empty', function() {
      var count = 0;
      for(var key in GeoJSON.defaults) {
        if(GeoJSON.defaults.hasOwnProperty(key)) {
          count++;
        }
      }

      expect(count).to.be(0);
    });
  });

  describe('#parse', function(){
    var data;

    before(function() {
      // Sample Data
      data = [
        { name: 'Location A', category: 'Store', lat: 39.984, lng: -75.343, street: 'Market' },
        { name: 'Location B', category: 'House', lat: 39.284, lng: -75.833, street: 'Broad' },
        { name: 'Location C', category: 'Office', lat: 39.123, lng: -74.534, street: 'South' }
      ];
    });

    it('returns output with the same number of features as the input', function(){
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      expect(output.features.length).to.be(3);
    });

    it('doesn\'t include geometry fields in feature properties', function(){
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      output.features.forEach(function(feature){
        expect(feature.properties.lat).to.not.be.ok();
        expect(feature.properties.lng).to.not.be.ok();
        expect(feature.geometry.coordinates[0]).to.be.ok();
        expect(feature.geometry.coordinates[1]).to.be.ok();
      });
    });

    it('includes all properties besides geometry attributes when include or exclude isn\'t set', function() {
      var output = GeoJSON.parse(data, {Point: ['lat', 'lng']});

      output.features.forEach(function(feature){
        expect(feature.properties.name).to.be.ok();
{'fraction_non_alphanumeric': 0.17902399568616878, 'fraction_numerical': 0.018333782690752223, 'mean_word_length': 2.925925925925926, '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': '597935', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1118, 'n_words': 277}