Skip to content

Commit 65d9d16

Browse files
committed
test(runtime): assert the second rebuild in the multi-rebuild state specs
1 parent 9cc697a commit 65d9d16

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎test-app/app/src/main/assets/app/tests/testWrapperLifetimeStateWrites.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,11 @@ describe("Wrapper lifetime state writes", function () {
220220
})();
221221
object = null;
222222
collect();
223+
var before = rebuilds();
223224
object = Holder.held;
225+
if (canary) {
226+
expect(rebuilds()).toBeGreaterThan(before);
227+
}
224228
expect(Object.keys(object)).toEqual(["a", "c", "b"]);
225229
expect([object.a, object.b, object.c]).toEqual([3, 2, 1]);
226230
});
@@ -288,7 +292,12 @@ describe("Wrapper lifetime state writes", function () {
288292
object.plain = 5;
289293
object = null;
290294
collect();
291-
expect(Holder.held.plain).toBe(5);
295+
var before = rebuilds();
296+
object = Holder.held;
297+
if (canary) {
298+
expect(rebuilds()).toBeGreaterThan(before);
299+
}
300+
expect(object.plain).toBe(5);
292301
});
293302

294303
it("keeps fields a TypeScript-style subclass defines in its constructor", function () {

0 commit comments

Comments
 (0)