lint: Run eslint --fix on bin/ and tests/

This commit is contained in:
Richard Hansen 2020-11-23 13:21:51 -05:00 committed by John McLear
parent 0625739cb8
commit b8d07a42eb
78 changed files with 4319 additions and 4599 deletions

View file

@ -1,29 +1,29 @@
describe("timeslider", function(){
var padId = 735773577357+(Math.round(Math.random()*1000));
describe('timeslider', function () {
const padId = 735773577357 + (Math.round(Math.random() * 1000));
//create a new pad before each test run
beforeEach(function(cb){
// create a new pad before each test run
beforeEach(function (cb) {
helper.newPad(cb, padId);
});
it("Makes sure the export URIs are as expected when the padID is numeric", async function() {
it('Makes sure the export URIs are as expected when the padID is numeric', async function () {
await helper.edit('a\n');
await helper.gotoTimeslider(1);
// ensure we are on revision 1
await helper.waitForPromise(function(){return helper.contentWindow().location.hash === '#1'})
await helper.waitForPromise(() => helper.contentWindow().location.hash === '#1');
// expect URI to be similar to
// http://192.168.1.48:9001/p/2/1/export/html
// http://192.168.1.48:9001/p/735773577399/1/export/html
let rev1ExportLink = helper.contentWindow().$('#exporthtmla').attr('href');
const rev1ExportLink = helper.contentWindow().$('#exporthtmla').attr('href');
expect(rev1ExportLink).to.contain('/1/export/html');
// Click somewhere left on the timeslider to go to revision 0
helper.sliderClick(30);
let rev0ExportLink = helper.contentWindow().$('#exporthtmla').attr('href');
const rev0ExportLink = helper.contentWindow().$('#exporthtmla').attr('href');
expect(rev0ExportLink).to.contain('/0/export/html');
});
});