mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
move internal stuff in _, add unique id for each widget
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { escape, htmlTrim } from "../src/ts/core/utils";
|
||||
import { escape, htmlTrim, idGenerator } from "../src/ts/core/utils";
|
||||
|
||||
describe("escape", () => {
|
||||
test("normal strings", () => {
|
||||
@@ -25,3 +25,12 @@ describe("htmlTrim", () => {
|
||||
expect(htmlTrim("")).toBe("");
|
||||
});
|
||||
});
|
||||
|
||||
describe("idGenerator", () => {
|
||||
test("basic use", () => {
|
||||
let gen = idGenerator();
|
||||
expect(gen()).toBe(1);
|
||||
expect(gen()).toBe(2);
|
||||
expect(gen()).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user