]> git.proxmox.com Git - mirror_novnc.git/blobdiff - tests/test.display.js
Use fat arrow functions `const foo = () => { ... };` for callbacks
[mirror_novnc.git] / tests / test.display.js
index a7afd0623e1522a206787cc0c21eca1eed7547d8..e3810effa9f98ecc45a27cf06e7242df16cad421 100644 (file)
@@ -284,7 +284,7 @@ describe('Display/Canvas Helper', function () {
         it('should draw the logo on #clear with a logo set', function (done) {
             display._logo = { width: 4, height: 4, type: "image/png", data: make_image_png(checked_data) };
             display.clear();
-            display.onflush = function () {
+            display.onflush = () => {
                 expect(display).to.have.displayed(checked_data);
                 expect(display._fb_width).to.equal(4);
                 expect(display._fb_height).to.equal(4);
@@ -325,7 +325,7 @@ describe('Display/Canvas Helper', function () {
         it('should support drawing images via #imageRect', function (done) {
             display.imageRect(0, 0, "image/png", make_image_png(checked_data));
             display.flip();
-            display.onflush = function () {
+            display.onflush = () => {
                 expect(display).to.have.displayed(checked_data);
                 done();
             };