1
1
'use strict' ;
2
2
3
3
const Changeset = require ( '../../../static/js/Changeset' ) ;
4
+ const { padutils} = require ( '../../../static/js/pad_utils' ) ;
4
5
const { poolOrArray} = require ( '../easysync-helper.js' ) ;
5
6
6
7
describe ( 'easysync-assembler' , function ( ) {
@@ -101,9 +102,14 @@ describe('easysync-assembler', function () {
101
102
'attr5,5' ,
102
103
] ) ;
103
104
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
+ }
107
113
assem . endDocument ( ) ;
108
114
expect ( assem . toString ( ) ) . to . equal ( '*3*4*5+8*1*4*5+4' ) ;
109
115
} ) ;
@@ -118,9 +124,14 @@ describe('easysync-assembler', function () {
118
124
'attr5,5' ,
119
125
] ) ;
120
126
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
+ }
124
135
assem . endDocument ( ) ;
125
136
expect ( assem . toString ( ) ) . to . equal ( '*3*4*5|3+f*1*4*5|1+1*1*4*5+4' ) ;
126
137
} ) ;
0 commit comments