Skip to content

Commit 2795d00

Browse files
webzwo0irhansen
authored andcommitted
easysync: add clear method to stringAssembler
1 parent deb7ce8 commit 2795d00

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
@@ -677,6 +677,7 @@ exports.stringAssembler = () => ({
677677
* @param {string} x -
678678
*/
679679
append(x) { this._str += String(x); },
680+
clear() { this._str = ''; },
680681
toString() { return this._str; },
681682
});
682683

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

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

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

0 commit comments

Comments
 (0)