<commit_before>/* global describe, it, before, beforeEach */

var path = require('path');
var when = require('when');
var delay = require('when/delay');

var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;

var Snoocore = require('../../../Snoocore');
var config = require('../config');
var util = require('./util');

describe('Snoocore Behavior Test (noauth)', function () {

  this.timeout(config.testTimeout);

  it('should GET resources while not logged in', function() {

    var reddit = util.getRawInstance();

    return reddit('/r/$subreddit/new').get({
      $subreddit: 'pcmasterrace'
    }).then(function(result) {
      var subreddit = result.data.children[0].data.subreddit;
      expect(subreddit).to.equal('pcmasterrace');
    });
  });

  it('should not get resources when not logged in', function() {
    var reddit = util.getRawInstance();
    return reddit('/api/me.json').get().then(function(data) {
      return expect(data).to.eql({});
    });
  });<commit_msg>fix path for Snoocore require<commit_after>/* global describe, it, before, beforeEach */

var path = require('path');
var when = require('when');
var delay = require('when/delay');

var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;

var Snoocore = require('../../Snoocore');
var config = require('../config');
var util = require('./util');

describe.only('Snoocore Behavior Test (noauth)', function () {

  this.timeout(config.testTimeout);

  it('should GET resources while not logged in', function() {

    var reddit = util.getRawInstance();

    return reddit('/r/$subreddit/new').get({
      $subreddit: 'pcmasterrace'
    }).then(function(result) {
      var subreddit = result.data.children[0].data.subreddit;
      expect(subreddit).to.equal('pcmasterrace');
    });
  });

  it('should not get resources when not logged in', function() {
    var reddit = util.getRawInstance();
    return reddit('/api/me.json').get().then(function(data) {
      return expect(data).to.eql({});
    });
  });
{'fraction_non_alphanumeric': 0.1811391223155929, 'fraction_numerical': 0.0009337068160597573, 'mean_word_length': 4.018735362997658, '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': '515350', 'n_tokens_mistral': 677, 'n_tokens_neox': 676, 'n_words': 156}