Skip to content

Commit

Permalink
Issue #715 Update fs.lstat.spec.js to have proper const and let inste…
Browse files Browse the repository at this point in the history
…ad of var and added 'use strict' (#727)

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js

* Update fs.lstat.spec.js
  • Loading branch information
hoaianhkhang authored and humphd committed Feb 12, 2019
1 parent f2201e7 commit e6f8ef2
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions tests/spec/fs.lstat.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
var util = require('../lib/test-utils.js');
var expect = require('chai').expect;
'use strict';
const util = require('../lib/test-utils.js');
const expect = require('chai').expect;

describe('fs.lstat', function() {
beforeEach(util.setup);
afterEach(util.cleanup);

it('should be a function', function() {
var fs = util.fs();
const fs = util.fs();
expect(typeof fs.lstat).to.equal('function');
});

it('should return an error if path does not exist', function(done) {
var fs = util.fs();

const fs = util.fs();
fs.lstat('/tmp', function(error, result) {
expect(error).to.exist;
expect(error.code).to.equal('ENOENT');
Expand All @@ -22,8 +23,8 @@ describe('fs.lstat', function() {
});

it('should return a stat object if path is not a symbolic link', function(done) {
var fs = util.fs();

const fs = util.fs();
fs.lstat('/', function(error, result) {
expect(error).not.to.exist;
expect(result).to.exist;
Expand All @@ -33,8 +34,8 @@ describe('fs.lstat', function() {
});

it('should return a stat object if path is a symbolic link', function(done) {
var fs = util.fs();

const fs = util.fs();
fs.symlink('/', '/mylink', function(error) {
if(error) throw error;

Expand Down Expand Up @@ -74,7 +75,7 @@ describe('fs.promises.lstat', () => {
afterEach(util.cleanup);

it('should return an error if path does not exist', () => {
var fsPromises = util.fs().promises;
const fsPromises = util.fs().promises;

return fsPromises.lstat('/tmp')
.catch( error => {
Expand All @@ -84,8 +85,8 @@ describe('fs.promises.lstat', () => {
});

it('should return a stat object if path is not a symbolic link', () => {
var fsPromises = util.fs().promises;

const fsPromises = util.fs().promises;
return fsPromises.lstat('/')
.then(result => {
expect(result).to.exist;
Expand Down

0 comments on commit e6f8ef2

Please sign in to comment.