Fix test failure message when headless out isn't json
Summary: Jest expects any promise rejections to be errors, not strings. Reviewed By: passy Differential Revision: D16200876 fbshipit-source-id: 7ebb6c63262b3c13ec677b1e72010146aa5b55e8
This commit is contained in:
committed by
Facebook Github Bot
parent
222676eb44
commit
df6c485b6b
@@ -68,7 +68,9 @@ const runHeadless = memoize((args: Array<string>) => {
|
||||
} catch (e) {
|
||||
console.warn(stderrChunks.join(''));
|
||||
reject(
|
||||
`Failed to parse headless output as JSON (${e.message}): ${stdout}`,
|
||||
new Error(
|
||||
`Failed to parse headless output as JSON (${e.message}): ${stdout}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user