Add readCurrentRevision helper

Summary: To read the current revision written into the manifest at build-time.

Reviewed By: danielbuechele

Differential Revision: D14454983

fbshipit-source-id: adad7d85dbf410701d2f8601bfccbcfbc0f30dff
This commit is contained in:
Pascal Hartig
2019-03-14 04:44:52 -07:00
committed by Facebook Github Bot
parent aad970defd
commit e97dddfda6
2 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import {readCurrentRevision} from '../packageMetadata.js';
test('readCurrentRevision does not return something meaningful in dev mode', async () => {
const ret = await readCurrentRevision();
expect(ret).toBeUndefined();
});