packager-worker-for-buck: transformCommand: add test
Reviewed By: davidaurelio Differential Revision: D6232002 fbshipit-source-id: 8bdd0dd0dabff4b92b4c2d7b4c3f7a2d90723bee
This commit is contained in:
parent
e0202e459f
commit
73a01be9bc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue