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


test('no intersections (square)', function(t) {

  var poly = [
    [0, 0],
    [10, 0],
    [10, 10],
    [0, 10],
    [0, 0]
  ];

  var r = isects(poly);

  t.equal(r.length, 0, 'no self-intersections');

  t.end();
});

test('interesections (hourglass)', function(t) {

  var poly = [
    [0, 0],
    [10, 0],
    [0, 10],
    [10, 10],
  ];

  var r = isects(poly);
  console.log(r);
  t.equal(r.length, 1, 'no self-intersections');
  t.deepEqual(r[0], [5, 0], 'isect at (5, 0)')
  t.end();
});<commit_msg>remove debug<commit_after>var test = require('tape');
var isects = require('./intersections');


test('no intersections (square)', function(t) {

  var poly = [
    [0, 0],
    [10, 0],
    [10, 10],
    [0, 10],
    [0, 0]
  ];

  var r = isects(poly);

  t.equal(r.length, 0, 'no self-intersections');

  t.end();
});

test('interesections (hourglass)', function(t) {

  var poly = [
    [0, 0],
    [10, 0],
    [0, 10],
    [10, 10],
  ];

  var r = isects(poly);
  t.equal(r.length, 1, 'no self-intersections');
  t.deepEqual(r[0], [5, 0], 'isect at (5, 0)')
  t.end();
});
{'fraction_non_alphanumeric': 0.23319148936170211, 'fraction_numerical': 0.05617021276595745, 'mean_word_length': 2.8684210526315788, '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': '1097797', 'n_tokens_mistral': 548, 'n_tokens_neox': 489, 'n_words': 118}