Skip to content

Commit

Permalink
Update SpecHelper.js (publiclab#1224)
Browse files Browse the repository at this point in the history
Updated es5 to es6, replaced var to let.

Co-authored-by: Jeffrey Warren <[email protected]>
  • Loading branch information
liliyao2022 and jywarren authored Jan 25, 2023
1 parent edac0a9 commit f4f124f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/SpecHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chai.simulateEvent = function simulateEventFn(el, type, params) {
bubbles: type != 'mouseleave' && type != 'mouseeenter',
cancelable: type != 'mousemove' && type != 'mouseleave' && type != 'mouseeenter',
};
var e = new MouseEvent(type, params);
let e = new MouseEvent(type, params);
return el.dispatchEvent(e);
};

Expand All @@ -30,17 +30,17 @@ chai.simulateEvent = function simulateEventFn(el, type, params) {
* > true
*/
chai.use(function(chai, utils) {
var Assertion = chai.Assertion;
let Assertion = chai.Assertion;
Assertion.addMethod('closeToLatLng', function(actual, delta, message) {
var obj = utils.flag(this, 'object');
let obj = utils.flag(this, 'object');

delta = delta || 1e-4;

expect(obj).to.have.property('lat');
expect(obj).to.have.property('lng');

var lat = new Assertion(obj.lat);
var lng = new Assertion(obj.lng);
let lat = new Assertion(obj.lat);
let lng = new Assertion(obj.lng);

utils.transferFlags(this, lat, false);
utils.transferFlags(this, lng, false);
Expand Down

0 comments on commit f4f124f

Please sign in to comment.