11'use strict' ;
22
33const Changeset = require ( '../../../static/js/Changeset' ) ;
4+ const { padutils} = require ( '../../../static/js/pad_utils' ) ;
45const { poolOrArray} = require ( '../easysync-helper.js' ) ;
56
67describe ( 'easysync-assembler' , function ( ) {
@@ -101,9 +102,14 @@ describe('easysync-assembler', function () {
101102 'attr5,5' ,
102103 ] ) ;
103104
104- assem . appendOpWithText ( '+' , 'test' , '*3*4*5' , pool ) ;
105- assem . appendOpWithText ( '+' , 'test' , '*3*4*5' , pool ) ;
106- assem . appendOpWithText ( '+' , 'test' , '*1*4*5' , pool ) ;
105+ padutils . warnDeprecated . disabledForTestingOnly = true ;
106+ try {
107+ assem . appendOpWithText ( '+' , 'test' , '*3*4*5' , pool ) ;
108+ assem . appendOpWithText ( '+' , 'test' , '*3*4*5' , pool ) ;
109+ assem . appendOpWithText ( '+' , 'test' , '*1*4*5' , pool ) ;
110+ } finally {
111+ delete padutils . warnDeprecated . disabledForTestingOnly ;
112+ }
107113 assem . endDocument ( ) ;
108114 expect ( assem . toString ( ) ) . to . equal ( '*3*4*5+8*1*4*5+4' ) ;
109115 } ) ;
@@ -118,9 +124,14 @@ describe('easysync-assembler', function () {
118124 'attr5,5' ,
119125 ] ) ;
120126
121- assem . appendOpWithText ( '+' , 'test\ntest' , '*3*4*5' , pool ) ;
122- assem . appendOpWithText ( '+' , '\ntest\n' , '*3*4*5' , pool ) ;
123- assem . appendOpWithText ( '+' , '\ntest' , '*1*4*5' , pool ) ;
127+ padutils . warnDeprecated . disabledForTestingOnly = true ;
128+ try {
129+ assem . appendOpWithText ( '+' , 'test\ntest' , '*3*4*5' , pool ) ;
130+ assem . appendOpWithText ( '+' , '\ntest\n' , '*3*4*5' , pool ) ;
131+ assem . appendOpWithText ( '+' , '\ntest' , '*1*4*5' , pool ) ;
132+ } finally {
133+ delete padutils . warnDeprecated . disabledForTestingOnly ;
134+ }
124135 assem . endDocument ( ) ;
125136 expect ( assem . toString ( ) ) . to . equal ( '*3*4*5|3+f*1*4*5|1+1*1*4*5+4' ) ;
126137 } ) ;
0 commit comments