<commit_before>/**
 * Robinhood API NodeJS Wrapper - Tests
 * @author <NAME>
 * @license AGPLv3 - See LICENSE file for more details
 */

var should = require('should'),
  Robinhood = require('../src/robinhood.js');
  
describe('Robinhood API', function() {
  var trader = null;
  
  before(function(done){
    // I don't have a valid username at the moment
    // so can't really test this
    try{
      trader = Robinhood({
        username: 'user',
        password: '<PASSWORD>'
      }, function(){
        done();
        return;
      });
    }catch(err){
      done(err);
      return;
    }
  });
  
  it('Should get Quote data', function(done) {
    trader.quote_data('GOOG', function(err, httpResponse, body){
      if(err){
        done(err);
        return;
      }
      console.log('Quote data:', body);
      done();
    });
  });
});<commit_msg>test cleanup. Still needs to assert things<commit_after>/**
 * Robinhood API NodeJS Wrapper - Tests
 * @author <NAME>
 * @license AGPLv3 - See LICENSE file for more details
 */

var should = require('should');
var Robinhood = require('../src/robinhood');

describe('Robinhood API', function() {
    it('Should get GOOGLE quote', function(done) {
        Robinhood(null).quote_data('GOOG', function(err, response, body) {
            if(err){
                done(err);
                return;
            }

            console.log(body);
            done();
        });
    });
});
{'fraction_non_alphanumeric': 0.15166204986149584, 'fraction_numerical': 0.0013850415512465374, 'mean_word_length': 2.247191011235955, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2594822', 'n_tokens_mistral': 442, 'n_tokens_neox': 434, 'n_words': 116}