1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Update Prettier to version 2.0

Please note that these changes were done automatically, using `gulp lint --fix`.

Given that the major version number was increased, there's a fair number of (primarily whitespace) changes; please see https://prettier.io/blog/2020/03/21/2.0.0.html
In order to reduce the size of these changes somewhat, this patch maintains the old "arrowParens" style for now (once mozilla-central updates Prettier we can simply choose the same formatting, assuming it will differ here).
This commit is contained in:
Jonas Jenwald 2020-04-14 12:28:14 +02:00
parent a4dd081d7b
commit 426945b480
145 changed files with 2005 additions and 2009 deletions

View file

@ -44,13 +44,13 @@ class MockLinkService extends SimpleLinkService {
}
}
describe("pdf_find_controller", function() {
describe("pdf_find_controller", function () {
let eventBus;
let pdfFindController;
beforeEach(function(done) {
beforeEach(function (done) {
const loadingTask = getDocument(buildGetDocumentParams("tracemonkey.pdf"));
loadingTask.promise.then(function(pdfDocument) {
loadingTask.promise.then(function (pdfDocument) {
eventBus = new EventBus();
const linkService = new MockLinkService();
@ -66,13 +66,13 @@ describe("pdf_find_controller", function() {
});
});
afterEach(function() {
afterEach(function () {
eventBus = null;
pdfFindController = null;
});
function testSearch({ parameters, matchesPerPage, selectedMatch }) {
return new Promise(function(resolve) {
return new Promise(function (resolve) {
pdfFindController.executeCommand("find", parameters);
// The `updatefindmatchescount` event is only emitted if the page contains
@ -124,7 +124,7 @@ describe("pdf_find_controller", function() {
});
}
it("performs a normal search", function(done) {
it("performs a normal search", function (done) {
testSearch({
parameters: {
query: "Dynamic",
@ -141,7 +141,7 @@ describe("pdf_find_controller", function() {
}).then(done);
});
it("performs a normal search and finds the previous result", function(done) {
it("performs a normal search and finds the previous result", function (done) {
// Page 14 (with page index 13) contains five results. By default, the
// first result (match index 0) is selected, so the previous result
// should be the fifth result (match index 4).
@ -161,7 +161,7 @@ describe("pdf_find_controller", function() {
}).then(done);
});
it("performs a case sensitive search", function(done) {
it("performs a case sensitive search", function (done) {
testSearch({
parameters: {
query: "Dynamic",
@ -178,7 +178,7 @@ describe("pdf_find_controller", function() {
}).then(done);
});
it("performs an entire word search", function(done) {
it("performs an entire word search", function (done) {
// Page 13 contains both 'Government' and 'Governmental', so the latter
// should not be found with entire word search.
testSearch({
@ -197,7 +197,7 @@ describe("pdf_find_controller", function() {
}).then(done);
});
it("performs a multiple term (no phrase) search", function(done) {
it("performs a multiple term (no phrase) search", function (done) {
// Page 9 contains 'alternate' and pages 6 and 9 contain 'solution'.
// Both should be found for multiple term (no phrase) search.
testSearch({