Skip to content

Commit 65360f8

Browse files
committed
Run prettier on changed files
1 parent 52c20cb commit 65360f8

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

js/widgets/__tests__/temperament.test.js

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const TemperamentWidget = require("../temperament");
22
describe("TemperamentWidget basic tests", () => {
33
let widget;
4-
global._ = jest.fn((text) => text);
4+
global._ = jest.fn(text => text);
55

66
beforeEach(() => {
77
document.body.innerHTML = `
@@ -10,7 +10,7 @@ describe("TemperamentWidget basic tests", () => {
1010
<div id="userEdit"></div>
1111
`;
1212

13-
global._ = jest.fn((text) => text);
13+
global._ = jest.fn(text => text);
1414

1515
global.wheelnav = jest.fn().mockImplementation(() => ({
1616
wheelRadius: 0,
@@ -45,7 +45,7 @@ describe("TemperamentWidget basic tests", () => {
4545
DonutSliceCustomization: () => ({})
4646
}));
4747

48-
global.docById = jest.fn((id) => ({
48+
global.docById = jest.fn(id => ({
4949
innerHTML: "",
5050
style: {},
5151
append: jest.fn(),
@@ -68,8 +68,8 @@ describe("TemperamentWidget basic tests", () => {
6868
widget._logo = {
6969
resetSynth: jest.fn(),
7070
synth: {
71-
trigger: jest.fn(),
72-
},
71+
trigger: jest.fn()
72+
}
7373
};
7474

7575
widget.frequencies = [440];
@@ -151,7 +151,7 @@ describe("TemperamentWidget basic tests", () => {
151151
widget.tempRatios1 = [2];
152152
widget.frequencies = [440];
153153

154-
global.docById = jest.fn((id) => {
154+
global.docById = jest.fn(id => {
155155
if (id === "wheelDiv4") return null;
156156
return { style: {} };
157157
});
@@ -205,7 +205,7 @@ describe("TemperamentWidget basic tests", () => {
205205
global.docById = jest.fn(() => ({
206206
innerHTML: "",
207207
style: {},
208-
append: jest.fn(),
208+
append: jest.fn()
209209
}));
210210
document.querySelectorAll = jest.fn(() => [
211211
{ style: {} },
@@ -244,7 +244,7 @@ describe("TemperamentWidget basic tests", () => {
244244
});
245245

246246
test("arbitraryEdit sets editMode to arbitrary", () => {
247-
global.docById = jest.fn((id) => {
247+
global.docById = jest.fn(id => {
248248
if (id === "circ1") {
249249
return {
250250
style: {},
@@ -266,7 +266,7 @@ describe("TemperamentWidget basic tests", () => {
266266
innerHTML: "",
267267
style: {},
268268
append: jest.fn(),
269-
addEventListener: jest.fn() // 👈 ADD THIS
269+
addEventListener: jest.fn() // 👈 ADD THIS
270270
};
271271
});
272272

@@ -338,7 +338,10 @@ describe("TemperamentWidget basic tests", () => {
338338
widget.ratios = [1, 2];
339339
widget.frequencies = [440, 880];
340340
widget.intervals = ["0", "1"];
341-
widget.notes = [["C", 4], ["C", 5]];
341+
widget.notes = [
342+
["C", 4],
343+
["C", 5]
344+
];
342345
widget.scaleNotes = ["C"];
343346
widget.circleIsVisible = false;
344347

@@ -375,7 +378,7 @@ describe("TemperamentWidget basic tests", () => {
375378
widget.tempRatios1 = [1];
376379
widget.tempRatios = [1];
377380

378-
global.docById = jest.fn((id) => {
381+
global.docById = jest.fn(id => {
379382
if (id === "frequencySlider") {
380383
return { value: 880 };
381384
}
@@ -410,7 +413,7 @@ describe("TemperamentWidget basic tests", () => {
410413
textMsg: jest.fn()
411414
};
412415

413-
global.docById = jest.fn((id) => {
416+
global.docById = jest.fn(id => {
414417
if (id === "startNote") return { value: 3 };
415418
if (id === "endNote") return { value: 1 };
416419
return {
@@ -465,7 +468,7 @@ describe("TemperamentWidget basic tests", () => {
465468
synth: {
466469
stop: jest.fn(),
467470
setMasterVolume: jest.fn(),
468-
startingPitch: "C4" // 👈 REQUIRED
471+
startingPitch: "C4" // 👈 REQUIRED
469472
}
470473
};
471474

@@ -485,7 +488,10 @@ describe("TemperamentWidget basic tests", () => {
485488

486489
widget.inTemperament = "equal";
487490
widget.ratios = [1, 2];
488-
widget.notes = [["C", 4], ["C", 5]];
491+
widget.notes = [
492+
["C", 4],
493+
["C", 5]
494+
];
489495
widget.powerBase = 2;
490496

491497
widget._logo = {

js/widgets/temperament.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,7 +2195,7 @@ function TemperamentWidget() {
21952195
row.id = "buttonsRow";
21962196

21972197
temperamentCell = row.insertCell();
2198-
if (temperamentCell){
2198+
if (temperamentCell) {
21992199
temperamentCell.innerHTML = this.inTemperament;
22002200
}
22012201
temperamentCell.style.width = 2 * BUTTONSIZE + "px";
@@ -2337,4 +2337,4 @@ function TemperamentWidget() {
23372337

23382338
if (typeof module !== "undefined") {
23392339
module.exports = TemperamentWidget;
2340-
}
2340+
}

0 commit comments

Comments
 (0)