Skip to content

Commit 49182eb

Browse files
committed
fix remove scope listener test
1 parent 1bde956 commit 49182eb

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
@@ -300,7 +300,15 @@ describe('Scope', () => {
300300
it('notifies scope listeners after deletion', () => {
301301
const scope = new Scope();
302302
const listener = vi.fn();
303+
303304
scope.addScopeListener(listener);
305+
scope.setAttribute('str', { type: 'string', value: 'b' });
306+
expect(listener).toHaveBeenCalledTimes(1);
307+
308+
listener.mockClear();
309+
310+
scope.removeAttribute('str');
311+
expect(listener).toHaveBeenCalledTimes(1);
304312
});
305313

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

0 commit comments

Comments
 (0)