Issue #715 Update fs.lstat.spec.js to have proper const and let instead 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
This commit is contained in:
parent
f2201e7a74
commit
e6f8ef2251
|
@ -1,17 +1,18 @@
|
|||
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;
|
||||
|
@ -22,7 +23,7 @@ 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;
|
||||
|
@ -33,7 +34,7 @@ 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;
|
||||
|
@ -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 => {
|
||||
|
@ -84,7 +85,7 @@ 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 => {
|
||||
|
|
Loading…
Reference in New Issue