mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] reactivity: work even if no callback is given
This commit is contained in:
committed by
Aaron Bohy
parent
92cc4375f8
commit
06fc3a2c77
@@ -60,6 +60,13 @@ describe("Reactivity", () => {
|
||||
expect(Array.isArray(state)).toBe(true);
|
||||
});
|
||||
|
||||
test("work if there are no callback given", () => {
|
||||
const state = reactive({ a: 1 });
|
||||
expect(state.a).toBe(1);
|
||||
state.a = 2;
|
||||
expect(state.a).toBe(2);
|
||||
});
|
||||
|
||||
test("Throw error if value is not proxifiable", () => {
|
||||
expect(() => createReactive(1)).toThrow("Cannot make the given value reactive");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user