Skip to content

Commit 7cde59e

Browse files
Remove redundant resetObserverCounts() call in property tests
Simplified property observer test by removing unnecessary reset call. The test now syncs the observed property once, resets counters once, then runs assertions - eliminating redundant operations.
1 parent 9ed4820 commit 7cde59e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Tests/prelude.mjs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,16 +236,9 @@ function BridgeJSRuntimeTests_runJsWorks(instance, exports) {
236236
assert.equal(ph.computedReadonly, 1554); // intValue * 2 = 777 * 2
237237

238238
// Test property with observers
239-
// First, reset observer counts to start fresh
240-
exports.resetObserverCounts();
241-
let initialStats = exports.getObserverStats();
242-
assert.equal(initialStats, "willSet:0,didSet:0,willSetOld:0,willSetNew:0,didSetOld:0,didSetNew:0");
243-
244-
// Update observedProperty to match current intValue since constructor set it to old value
239+
// Sync observedProperty to match current intValue, then reset counters for clean test
245240
ph.observedProperty = 777; // Sync with current intValue after computed property changed it
246-
247-
// Reset counters again after syncing
248-
exports.resetObserverCounts();
241+
exports.resetObserverCounts(); // Reset counters to start fresh test
249242

250243
// Set property from JavaScript and verify observers are called
251244
ph.observedProperty = 100;

0 commit comments

Comments
 (0)