Skip to content

Commit 7e7c5c8

Browse files
webzwo0irhansen
authored andcommitted
easysync: add clear method to stringAssembler
1 parent 762dd9d commit 7e7c5c8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/static/js/Changeset.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ exports.stringAssembler = () => ({
579579
* @param {string} x -
580580
*/
581581
append(x) { this._str += String(x); },
582+
clear() { this._str = ''; },
582583
toString() { return this._str; },
583584
});
584585

src/tests/frontend/specs/easysync-assembler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('easysync-assembler', function () {
169169
expect(assem.toString()).to.equal('*3*4*5|3+f*1*4*5|1+1*1*4*5+4');
170170
});
171171

172-
xit('smartOpAssembler clear should empty internal assemblers', async function () {
172+
it('smartOpAssembler clear should empty internal assemblers', async function () {
173173
const x = '-c*3*4+6|3=az*asdf0*1*2*3+1=1-1+1*0+1=1-1+1|c=c-1';
174174
const iter = Changeset.opIterator(x);
175175
const assem = Changeset.smartOpAssembler();

0 commit comments

Comments
 (0)