Skip to content

Commit

Permalink
Tests WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Jun 20, 2017
1 parent 9aa9ca2 commit ebbb405
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions test/all.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@

// Modules
const chai = require('chai'),
expect = chai.expect,
//expect = chai.expect,
gotResume = require('../lib/');

// Constants
const URL_PREFIX = 'http://rawgit.com/overlookmotel/got-resume/dev/test/files/';

// Init
chai.config.includeStack = true;

Expand All @@ -18,8 +21,22 @@ chai.config.includeStack = true;
/* jshint expr: true */
/* global describe, it */

describe('Tests', function() {
it.skip('all', function() {
expect(gotResume).to.be.ok;
describe('Tests', () => {
describe('Transfers', () => {
it('Empty file', done => {
const stream = gotResume(URL_PREFIX + 'empty.txt', {log: console.log, attempts: 1});

let count = 0, err;
stream.on('data', () => count++);
stream.on('end', () => {
if (err) return;
if (count) return done(new Error('No data should have been received'));
done();
});
stream.on('error', _err => {
err = _err;
done(err);
});
});
});
});
Empty file added test/files/empty.txt
Empty file.

0 comments on commit ebbb405

Please sign in to comment.