@@ -4,10 +4,11 @@ const config = require('config');
44const appRoot = require ( 'app-root-path' ) ;
55const { testService } = require ( '../setup' ) ;
66const testData = require ( '../../data/xml' ) ;
7+ const palatableXML = require ( '../../data/test-xml' ) ;
78
89const { exhaust } = require ( appRoot + '/lib/worker/worker' ) ;
910
10- const upgradedUpdateEntity = `<?xml version="1.0"?>
11+ const upgradedUpdateEntity = palatableXML ( `<?xml version="1.0"?>
1112<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
1213 <h:head>
1314 <model entities:entities-version="2024.1.0">
@@ -27,9 +28,9 @@ const upgradedUpdateEntity = `<?xml version="1.0"?>
2728 <bind nodeset="/data/age" type="int" entities:saveto="age"/>
2829 </model>
2930 </h:head>
30- </h:html>` ;
31+ </h:html>` ) ;
3132
32- const upgradedSimpleEntity = `<?xml version="1.0"?>
33+ const upgradedSimpleEntity = palatableXML ( `<?xml version="1.0"?>
3334<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:entities="http://www.opendatakit.org/entities" xmlns:orx="http://openrosa.org/xforms">
3435 <h:head>
3536 <model entities:entities-version="2024.1.0">
@@ -50,7 +51,7 @@ const upgradedSimpleEntity = `<?xml version="1.0"?>
5051 <bind nodeset="/data/hometown" type="string"/>
5152 </model>
5253 </h:head>
53- </h:html>` ;
54+ </h:html>` ) ;
5455
5556describe ( 'Update / migrate entities-version within form' , ( ) => {
5657 describe ( 'upgrading a 2023.1.0 update form' , ( ) => {
0 commit comments