<commit_before>var test = require('tape');
var polygon = require('./');

test('polygon', function(t){
  t.plan(6);

  var poly = polygon([[[5, 10], [20, 40], [40, 0]]], {name: 'test polygon'});

  t.ok(poly);
  t.equal(poly.geometry.coordinates[0][0][0], 5);
  t.equal(poly.geometry.coordinates[0][1][0], 20);
  t.equal(poly.geometry.coordinates[0][2][0], 40);
  t.equal(poly.properties.name, 'test polygon');
  t.equal(poly.geometry.type, 'Polygon');
});<commit_msg>Add test for complete LinearRings in coordinate input<commit_after>var test = require('tape');
var polygon = require('./');

test('polygon', function(t){
  t.plan(7);

  var poly = polygon([[[5, 10], [20, 40], [40, 0]]], {name: 'test polygon'});

  t.ok(poly);
  t.equal(poly.geometry.coordinates[0][0][0], 5);
  t.equal(poly.geometry.coordinates[0][1][0], 20);
  t.equal(poly.geometry.coordinates[0][2][0], 40);
  t.equal(poly.properties.name, 'test polygon');
  t.equal(poly.geometry.type, 'Polygon');
  t.equal(polygon([[[20.0,0.0],[101.0,0.0],[101.0,1.0],[100.0,1.0],[100.0,0.0]]]).message, 'First and last coordinate pair are not equivalent', 'returns an error message');
});
{'fraction_non_alphanumeric': 0.24411508282476024, 'fraction_numerical': 0.06887532693984307, 'mean_word_length': 5.342541436464089, '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': '6279768', 'n_tokens_mistral': 485, 'n_tokens_neox': 434, 'n_words': 84}