Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #715 Update fs.lstat.spec.js to have proper const and let instead of var and added 'use strict' #727

Merged
merged 7 commits into from Feb 12, 2019
Copy path View file
@@ -13,7 +13,6 @@ describe('fs.lstat', function() {

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

This comment has been minimized.

Copy link
@humphd

humphd Feb 5, 2019

Contributor

Why remove all these blank lines? It's normally a bad idea to touch lines that aren't really part of this fix. The reason it's generally avoided is that it will alter the history of these lines in git, making them look like they were changed in this PR, but really they weren't.

This comment has been minimized.

Copy link
@hoaianhkhang

hoaianhkhang Feb 6, 2019

Author Contributor

I have changed the file again with the space

fs.lstat('/tmp', function(error, result) {
expect(error).to.exist;
expect(error.code).to.equal('ENOENT');
@@ -24,7 +23,6 @@ describe('fs.lstat', function() {

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

fs.lstat('/', function(error, result) {
expect(error).not.to.exist;
expect(result).to.exist;
@@ -35,7 +33,6 @@ describe('fs.lstat', function() {

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

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

@@ -54,8 +51,7 @@ describe('fs.promises.lstat', () => {
afterEach(util.cleanup);

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

const fsPromises = util.fs().promises;
return fsPromises.lstat('/tmp')
.catch( error => {
expect(error).to.exist;
@@ -65,7 +61,6 @@ describe('fs.promises.lstat', () => {

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

return fsPromises.lstat('/')
.then(result => {
expect(result).to.exist;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.