<commit_before><commit_msg>included quick tests<commit_after>// to be run in node
var gordian = require('gordian'),
  suite = new gordian('LokiTests'),
  loki = require('../src/lokijs.js'),
  db,
  users,
  view,
  query;

db = new loki('test.json');
users = db.addCollection('user', 'User');

users.insert({
  name: 'dave',
  age: 25,
  lang: 'English'
});

users.insert({
  name: 'joe',
  age: 39,
  lang: 'Italian'
});

users.insert({
  name: 'jonas',
  age: 30,
  lang: 'Swedish'
});

view = users.addDynamicView('test');
query = {
  'age': {
    '$gt': 24
  }
};

view.applyFind(query);

suite.assertEqual('Result data Equality', users.find(query), view.data());
suite.assertNotStrictEqual('Strict Equality', users.find(query), view.data());
suite.assertEqual('View data equality', view.resultset, view.resultset.copy());
suite.assertNotStrictEqual('View data copy strict equality', view.resultset, view.resultset.copy());
suite.report();
{'fraction_non_alphanumeric': 0.18981972428419935, 'fraction_numerical': 0.008483563096500531, 'mean_word_length': 4.7560975609756095, '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': '4373156', 'n_tokens_mistral': 346, 'n_tokens_neox': 334, 'n_words': 76}