react-native/local-cli/link/__tests__/android/makeStringsPatch.spec.js
Mike Grabowski 107fc72dab Fixes #9294
Differential Revision: D3752878

fbshipit-source-id: f248082effde9133dd6a9edf8a2f2cfc05279eab
2016-08-22 13:13:42 -07:00

21 lines
538 B
JavaScript

'use strict';
jest.autoMockOff();
const makeStringsPatch = require('../../android/patches/makeStringsPatch');
describe('makeStringsPatch', () => {
it('should export a patch with <string> element', () => {
const params = {
keyA: 'valueA',
};
expect(makeStringsPatch(params, 'module').patch)
.toContain('<string moduleConfig="true" name="module_keyA">valueA</string>');
});
it('should export an empty patch if no params given', () => {
expect(makeStringsPatch({}, 'module').patch).toBe('');
});
});