Fix lint issues in fs.close.spec.js, fs.link.spec.js
This commit is contained in:
parent
9e08d96c96
commit
1a738dd2bb
|
@ -20,8 +20,11 @@ describe('fs.close', function() {
|
||||||
|
|
||||||
var fd = result;
|
var fd = result;
|
||||||
fs.close(fd, function(error) {
|
fs.close(fd, function(error) {
|
||||||
|
if(error) throw error;
|
||||||
|
|
||||||
fs.read(fd, buffer, 0, buffer.length, undefined, function(error, result) {
|
fs.read(fd, buffer, 0, buffer.length, undefined, function(error, result) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
|
expect(result).not.to.exist;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -70,13 +70,17 @@ describe('fs.link', function() {
|
||||||
|
|
||||||
fs.stat('/', function (error, result) {
|
fs.stat('/', function (error, result) {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
var _oldstats = result;
|
expect(result).to.exist;
|
||||||
|
|
||||||
fs.symlink('/', '/myfileLink', function (error) {
|
fs.symlink('/', '/myfileLink', function (error) {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|
||||||
fs.link('/myfileLink', '/myotherfile', function (error) {
|
fs.link('/myfileLink', '/myotherfile', function (error) {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|
||||||
fs.lstat('/myfileLink', function (error, result) {
|
fs.lstat('/myfileLink', function (error, result) {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|
||||||
var _linkstats = result;
|
var _linkstats = result;
|
||||||
fs.lstat('/myotherfile', function (error, result) {
|
fs.lstat('/myotherfile', function (error, result) {
|
||||||
expect(error).not.to.exist;
|
expect(error).not.to.exist;
|
||||||
|
|
Loading…
Reference in New Issue