var test = require('tap').test;
var emoticons = require('../emoticons');

var tags = [ 'angry',
  'animal',
  'sorry',
  'bear',
  'bird',
  'cat',
  'confused',
  'crazy',
  'cry',
  'dance',
  'dead',
  'dog',
  'embarassed',
  'evil',
  'excited',
  'fun',
  'happy',
  'hide',
  'hug',
  'hurt',
  'kiss',
  'laugh',
  'love',
  'monkey',
  'music',
  'pig',
  'rabbit',
  'run',
  'sad',
  'scared',
  'sea creature',
  'sleep',
  'smug',
  'stare',
  'surprised',
  'surrender',
  'table flip',
  'think',
  'troll',
  'wave',
  'whatever',
  'wink',
  'worried',
  'write'
];

test('it is parseable JSON', function(t) {
  t.plan(1);
  t.type(emoticons, 'object');
});

test('expected indexes', function(t) {
  var keys = Object.keys(emoticons);
  t.plan(2);
  t.notEqual(keys.indexOf('emoticons'), -1);
  t.notEqual(keys.indexOf('tags'), -1);
});

test('expected tags', function(t) {
  t.plan(tags.length + 1);
  t.equal(emoticons.tags.length, tags.length);
  emoticons.tags.forEach(function (tag) {
    t.notEqual(tags.indexOf(tag.title), -1, 'Tags should include ' + tag);
  });
});

test('expected emojicons', function(t) {
  t.plan(1);
  t.equal(emoticons.emoticons.length, 1561);
});

@@ -65,16 +65,42 @@
 icons');
+%0Avar emoticonCount = 1561;
 %0A%0Avar ta
@@ -969,16 +969,54 @@
 .length,
+ tags.length, 'Tag count should be ' +
  tags.le
@@ -1113,35 +1113,40 @@
 1, '
-Tags should include
+Found an unexpected tag:
  ' + tag
 );%0A 
@@ -1141,16 +1141,22 @@
  ' + tag
+.title
 );%0A  %7D);
@@ -1253,19 +1253,73 @@
 length, 
-1561
+emoticonCount, 'Emoticon count should be ' + emoticonCount
 );%0A%7D);%0A

remove magic number and add messages to tests