mirror of
https://github.com/status-im/react-native.git
synced 2025-01-23 16:00:37 +00:00
1168d0db45
Summary: Fix regression of https://github.com/rnpm/rnpm-plugin-link/pull/88. Closes https://github.com/facebook/react-native/pull/9252 Differential Revision: D3680785 fbshipit-source-id: a6ea63295ae8f61b17c0a1b2ca5e6a5f5da7437a
20 lines
473 B
JavaScript
20 lines
473 B
JavaScript
'use strict';
|
|
|
|
jest.autoMockOff();
|
|
|
|
const applyParams = require('../../src/android/patches/applyParams');
|
|
|
|
describe('applyParams', () => {
|
|
it('apply params to the string', () => {
|
|
expect(
|
|
applyParams('${foo}', {foo: 'foo'}, 'react-native')
|
|
).toEqual('this.getResources().getString(R.string.reactNative_foo)');
|
|
});
|
|
|
|
it('use null if no params provided', () => {
|
|
expect(
|
|
applyParams('${foo}', {}, 'react-native')
|
|
).toEqual('null');
|
|
});
|
|
});
|