Skip to content

Commit 8f3d65a

Browse files
committed
fix linting/formatting issues
1 parent b2a4244 commit 8f3d65a

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎lib/optimize/ConcatenatedModule.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
const Module = require("../Module");
88
const Template = require("../Template");
99
const Parser = require("../Parser");
10-
const SortedSet = require("../util/SortableSet");
1110
const acorn = require("acorn");
1211
const escope = require("escope");
1312
const ReplaceSource = require("webpack-sources/lib/ReplaceSource");

‎test/SortableSet.test.js‎

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,25 @@ const SortableSet = require("../lib/util/SortableSet");
55

66
describe("util/SortableSet", () => {
77
it("Can be constructed like a normal Set", () => {
8-
const sortableSet = new SortableSet([1,1,1,1,1,4,5,2], () =>{});
9-
Array.from(sortableSet).should.eql([1,4,5,2]);
8+
const sortableSet = new SortableSet([1, 1, 1, 1, 1, 4, 5, 2], () => {});
9+
Array.from(sortableSet).should.eql([1, 4, 5, 2]);
1010
});
1111

1212
it("Can sort its content", () => {
13-
const sortableSet = new SortableSet([1,1,1,6,6,1,1,4,5,2,3,8,5,7,9,0,3,1], (a,b) => a - b);
13+
const sortableSet = new SortableSet(
14+
[1, 1, 1, 6, 6, 1, 1, 4, 5, 2, 3, 8, 5, 7, 9, 0, 3, 1],
15+
(a, b) => a - b
16+
);
1417
sortableSet.sort();
15-
Array.from(sortableSet).should.eql([0,1,2,3,4,5,6,7,8,9]);
18+
Array.from(sortableSet).should.eql([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
1619
});
1720

1821
it("Can sort by a specified function", () => {
19-
const sortableSet = new SortableSet([1,1,1,6,6,1,1,4,5,2,3,8,5,7,9,0,3,1], (a,b) => a - b);
20-
sortableSet.sortWith((a,b)=> b - a);
21-
Array.from(sortableSet).should.eql([9,8,7,6,5,4,3,2,1,0]);
22+
const sortableSet = new SortableSet(
23+
[1, 1, 1, 6, 6, 1, 1, 4, 5, 2, 3, 8, 5, 7, 9, 0, 3, 1],
24+
(a, b) => a - b
25+
);
26+
sortableSet.sortWith((a, b) => b - a);
27+
Array.from(sortableSet).should.eql([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]);
2228
});
2329
});

0 commit comments

Comments
 (0)