mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] improve tests of transition directive
This commit is contained in:
+12
-1
@@ -1,5 +1,5 @@
|
||||
import { Env } from "../src/component";
|
||||
import { QWeb } from "../src/qweb_core";
|
||||
import { QWeb, UTILS } from "../src/qweb_core";
|
||||
import "../src/qweb_directives";
|
||||
import "../src/qweb_extensions";
|
||||
|
||||
@@ -42,3 +42,14 @@ export function makeTestEnv(): Env {
|
||||
qweb: new QWeb()
|
||||
};
|
||||
}
|
||||
|
||||
let nextFrame = UTILS.nextFrame;
|
||||
export function patchNextFrame(f: Function): void {
|
||||
UTILS.nextFrame = (cb: () => void) => {
|
||||
setTimeout(() => f(cb));
|
||||
};
|
||||
}
|
||||
|
||||
export function unpatchNextFrame(): void {
|
||||
UTILS.nextFrame = nextFrame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user