fix: escape strings.xml app name (#1384)

This commit is contained in:
Tiago Pereira
2022-02-08 02:29:36 +00:00
committed by GitHub
parent a1ed1c0af7
commit f100809bf3
3 changed files with 26 additions and 1 deletions

View File

@@ -275,6 +275,13 @@ describe('create', function () {
});
});
it('should interpolate the escaped project name into strings.xml', () => {
config_mock.name.and.returnValue('<Incredible&App>');
return create.create(project_path, config_mock, {}, events_mock).then(() => {
expect(utils.replaceFileContents).toHaveBeenCalledWith(path.join(app_path, 'res', 'values', 'strings.xml'), /__NAME__/, '&lt;Incredible&amp;App&gt;');
});
});
it('should copy template scripts into generated project', () => {
return create.create(project_path, config_mock, {}, events_mock).then(() => {
expect(create.copyScripts).toHaveBeenCalledWith(project_path);