Skip to content

Commit b761c5a

Browse files
committed
fix remove scope listener test
1 parent 94842ba commit b761c5a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/core/test/lib/scope.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,15 @@ describe('Scope', () => {
331331
it('notifies scope listeners after deletion', () => {
332332
const scope = new Scope();
333333
const listener = vi.fn();
334+
334335
scope.addScopeListener(listener);
336+
scope.setAttribute('str', { type: 'string', value: 'b' });
337+
expect(listener).toHaveBeenCalledTimes(1);
338+
339+
listener.mockClear();
340+
341+
scope.removeAttribute('str');
342+
expect(listener).toHaveBeenCalledTimes(1);
335343
});
336344

337345
it('does nothing if the attribute does not exist', () => {

0 commit comments

Comments
 (0)