pull/16748/head
Rich Harris 1 week ago
parent 44eb8787b8
commit 48bace7439

@ -402,14 +402,6 @@ export class TreeState {
this.#mode = mode;
}
copy() {
const state = new TreeState(this.#mode);
state.#css = new Set(this.#css);
state.#head = this.#head.copy();
state.#uid = this.#uid;
return state;
}
/**
* @param {TreeState} other
*/

@ -205,12 +205,9 @@ test('subsume refuses to switch modes', () => {
);
});
test('TreeState uid generator uses prefix and is shared by copy()', () => {
test('TreeState uid generator uses prefix', () => {
const state = new TreeState('sync', 'id-');
assert.equal(state.uid(), 'id-s1');
const state_copy = state.copy();
assert.equal(state_copy.uid(), 'id-s2');
assert.equal(state.uid(), 'id-s3');
});
test('TreeHeadState title ordering favors later lexicographic paths', () => {

Loading…
Cancel
Save