Permalink
Browse files

packager-worker-for-buck: transformCommand: add test

Reviewed By: davidaurelio

Differential Revision: D6232002

fbshipit-source-id: 8bdd0dd0dabff4b92b4c2d7b4c3f7a2d90723bee
  • Loading branch information...
jeanlauliac authored and facebook-github-bot committed Nov 6, 2017
1 parent e0202e4 commit 73a01be9bcd9059f3172987fd30d8b6dc0125759
Showing with 4 additions and 2 deletions.
  1. +4 −2 local-cli/__mocks__/fs.js
@@ -255,7 +255,7 @@ fs.open.mockImplementation(function(filepath) {
}
if (error || data == null) {
error = Error(`ENOENT: no such file or directory, open ${filepath}`);
error = Error(`ENOENT: no such file or directory: \`${filepath}\``);
}
if (data != null) {
/* global Buffer: true */
@@ -409,7 +409,9 @@ function getToNode(filepath) {
}
node = node[part];
if (node == null) {
const err = new Error('ENOENT: no such file or directory');
const err = new Error(
`ENOENT: no such file or directory: \`${filepath}\``,
);
err.code = 'ENOENT';
throw err;
}

0 comments on commit 73a01be

Please sign in to comment.