<commit_before>var assert = require('assert');

suite('Query - Callback', function() {
  test('callback fires', function(done, server) {
    server.evalSync(function() {
      coll = new Meteor.SmartCollection('coll');
      query = new Meteor.SmartQuery(coll, {});

      query.snapshot(function() {
        emit('return');
      });
    });
    done();
  });

  test('callback fires', function(done, server) {
    var result = server.evalSync(function() {
      coll = new Meteor.SmartCollection('coll');
      query = new Meteor.SmartQuery(coll, {});

      var callbacks = [];
      var states = [];
      states.push(query.snapshotInProgress);
      query.snapshot(function() { callbacks.push(1); });
      states.push(query.snapshotInProgress);<commit_msg>added empty removed to make sure, db connection is established<commit_after>var assert = require('assert');

suite('Query - Callback', function() {
  test('callback fires', function(done, server) {
    server.evalSync(function() {
      coll = new Meteor.SmartCollection('coll');
      query = new Meteor.SmartQuery(coll, {});

      coll.remove({tt: 0});

      query.snapshot(function() {
        emit('return');
      });
    });
    done();
  });

  test('callback fires', function(done, server) {
    var result = server.evalSync(function() {
      coll = new Meteor.SmartCollection('coll');
      query = new Meteor.SmartQuery(coll, {});

      coll.remove({tt: 0});

      var callbacks = [];
      var states = [];
      states.push(query.snapshotInProgress);
      query.snapshot(function() { callbacks.push(1); });
      states.push(query.snapshotInProgress);
{'fraction_non_alphanumeric': 0.1637032495401594, 'fraction_numerical': 0.002452483139178418, 'mean_word_length': 3.227979274611399, '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': '1982099', 'n_tokens_mistral': 489, 'n_tokens_neox': 470, 'n_words': 94}