Skip to content

Commit 358b7a4

Browse files
hramosfacebook-github-bot
authored andcommitted
hermes-utils.js: Add test coverage
Summary: Improving test coverage in anticipation of some changes being made to `hermes-utils.js`. Moved test scripts to `hermes/__tests__` and grouped related tests. We have been delegating some of the work to local binaries via `execSync`, which can be hard to mock or test. We now use a proxy `delegateSync` method that uses `spawnSync` internally to break down the invocation into `command`, `arguments`, `options`. Instead of simply mocking based on the command being executed, we can now conditionally mock based on the arguments being passed. Added a `createTarballFromDirectory` method. This can be used later when creating different tarballs. Added `populateMockFilesystemWithHermesBuildArtifacts()` to mock the filesystem state after Hermes has been built. Changelog: [internal] Reviewed By: cipolleschi Differential Revision: D40871802 fbshipit-source-id: 4348d3c38926ec7eb13d794040a9040010879f58
1 parent b5bb227 commit 358b7a4

File tree

3 files changed

+507
-351
lines changed

3 files changed

+507
-351
lines changed

scripts/__tests__/hermes-utils-test.js

Lines changed: 0 additions & 336 deletions
This file was deleted.

0 commit comments

Comments
 (0)