diff --git a/Libraries/Utilities/__mocks__/PixelRatio.js b/Libraries/Utilities/__mocks__/PixelRatio.js new file mode 100644 index 0000000000..bcf04d7fe4 --- /dev/null +++ b/Libraries/Utilities/__mocks__/PixelRatio.js @@ -0,0 +1,20 @@ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +'use strict'; + +var PixelRatio = { + startDetecting: function () { + // noop for our implementation + }, + + get: function() { + return 2; + }, + + getPixelSizeForLayoutSize: function (layoutSize) { + return Math.round(layoutSize * PixelRatio.get()); + } +}; + +module.exports = PixelRatio;