Codebase list node-read-file / upstream/0.2.0+git20160811.1e6a528 test.js
upstream/0.2.0+git20160811.1e6a528

Tree @upstream/0.2.0+git20160811.1e6a528 (Download .tar.gz)

test.js @upstream/0.2.0+git20160811.1e6a528raw · history · blame

'ust strict';

var assert = require('assert');
var read = require('./');

describe('read-file', function () {
  it('should read the file synchronously:', function () {
    assert.equal(read.sync('fixtures/a.txt'), 'FILE CONTENTS!!!');
  });

  it('should read the file:', function (done) {
    read('fixtures/a.txt', function (err, str) {
      assert.equal(str, 'FILE CONTENTS!!!');
      done();
    });
  });
});