Skip to content

Commit

Permalink
Task: Enable delete
Browse files Browse the repository at this point in the history
  • Loading branch information
nick spragg committed Jan 18, 2017
1 parent 445a965 commit 25aeb3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ class File {
return this._access(fs.X_OK);
}

// delete() {
// return fsp.unlinkAsync(this._pathname);
// }
delete() {
return fsp.unlinkAsync(this._pathname);
}
}

module.exports.create = (filename) => {
Expand Down
6 changes: 1 addition & 5 deletions test/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ describe('File', () => {
});
});

describe.skip('.delete', () => {
describe('.delete', () => {
const fileToDelete = getFixturePath('delete/a.txt');
beforeEach(() => {
createFile(fileToDelete, {
Expand All @@ -469,10 +469,6 @@ describe('File', () => {
});
});

afterEach(() => {
deleteFileIfExists(fileToDelete);
});

it('deletes a file that exists', () => {
const file = File.create(getFixturePath('delete/a.txt'));

Expand Down

0 comments on commit 25aeb3d

Please sign in to comment.