blob: 3a70f2752c0d06d146d52d175cde8f4ce78b26bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
var fs = require('fs');
var path = require('path');
var os = require('os');
var tmpFile = path.join.bind(path, os.tmpdir());
describe('fs.readFile()', function(){
describe('when the file exists', function(){
it('should succeed', function(done){
fs.writeFile(tmpFile('mocha'), 'wahoo', done)
})
})
describe('when the file does not exist', function(){
it('should fail', function(done){
// uncomment
// fs.readFile(tmpFile('does-not-exist'), done);
done();
})
})
})
|