summaryrefslogtreecommitdiff
path: root/preact/compat/test/browser/unstable_batchedUpdates.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'preact/compat/test/browser/unstable_batchedUpdates.test.js')
-rw-r--r--preact/compat/test/browser/unstable_batchedUpdates.test.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/preact/compat/test/browser/unstable_batchedUpdates.test.js b/preact/compat/test/browser/unstable_batchedUpdates.test.js
new file mode 100644
index 0000000..61b2e8a
--- /dev/null
+++ b/preact/compat/test/browser/unstable_batchedUpdates.test.js
@@ -0,0 +1,15 @@
+import { unstable_batchedUpdates } from 'preact/compat';
+
+describe('unstable_batchedUpdates', () => {
+ it('should call the callback', () => {
+ const spy = sinon.spy();
+ unstable_batchedUpdates(spy);
+ expect(spy).to.be.calledOnce;
+ });
+
+ it('should call callback with only one arg', () => {
+ const spy = sinon.spy();
+ unstable_batchedUpdates(spy, 'foo', 'bar');
+ expect(spy).to.be.calledWithExactly('foo');
+ });
+});