mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Convert var
to const
/let
in the test/unit
folder
This has been done automatically using ESLint's `--fix` argument.
This commit is contained in:
parent
314ac21842
commit
3e2bfb5819
17 changed files with 630 additions and 604 deletions
|
@ -124,36 +124,36 @@ function initializePDFJS(callback) {
|
|||
|
||||
jasmineRequire.html(jasmine);
|
||||
|
||||
var env = jasmine.getEnv();
|
||||
const env = jasmine.getEnv();
|
||||
|
||||
var jasmineInterface = jasmineRequire.interface(jasmine, env);
|
||||
const jasmineInterface = jasmineRequire.interface(jasmine, env);
|
||||
extend(window, jasmineInterface);
|
||||
|
||||
// Runner Parameters
|
||||
var queryString = new jasmine.QueryString({
|
||||
const queryString = new jasmine.QueryString({
|
||||
getWindowLocation() {
|
||||
return window.location;
|
||||
},
|
||||
});
|
||||
|
||||
var config = {
|
||||
const config = {
|
||||
failFast: queryString.getParam("failFast"),
|
||||
oneFailurePerSpec: queryString.getParam("oneFailurePerSpec"),
|
||||
hideDisabled: queryString.getParam("hideDisabled"),
|
||||
};
|
||||
|
||||
var random = queryString.getParam("random");
|
||||
const random = queryString.getParam("random");
|
||||
if (random !== undefined && random !== "") {
|
||||
config.random = random;
|
||||
}
|
||||
|
||||
var seed = queryString.getParam("seed");
|
||||
const seed = queryString.getParam("seed");
|
||||
if (seed) {
|
||||
config.seed = seed;
|
||||
}
|
||||
|
||||
// Reporters
|
||||
var htmlReporter = new jasmine.HtmlReporter({
|
||||
const htmlReporter = new jasmine.HtmlReporter({
|
||||
env,
|
||||
navigateWithNewParam(key, value) {
|
||||
return queryString.navigateWithNewParam(key, value);
|
||||
|
@ -176,13 +176,13 @@ function initializePDFJS(callback) {
|
|||
env.addReporter(htmlReporter);
|
||||
|
||||
if (queryString.getParam("browser")) {
|
||||
var testReporter = new TestReporter(queryString.getParam("browser"));
|
||||
const testReporter = new TestReporter(queryString.getParam("browser"));
|
||||
env.addReporter(testReporter);
|
||||
}
|
||||
|
||||
// Filter which specs will be run by matching the start of the full name
|
||||
// against the `spec` query param.
|
||||
var specFilter = new jasmine.HtmlSpecFilter({
|
||||
const specFilter = new jasmine.HtmlSpecFilter({
|
||||
filterString() {
|
||||
return queryString.getParam("spec");
|
||||
},
|
||||
|
@ -200,7 +200,7 @@ function initializePDFJS(callback) {
|
|||
// Replace the browser window's `onload`, ensure it's called, and then run
|
||||
// all of the loaded specs. This includes initializing the `HtmlReporter`
|
||||
// instance and then executing the loaded Jasmine environment.
|
||||
var currentWindowOnload = window.onload;
|
||||
const currentWindowOnload = window.onload;
|
||||
|
||||
window.onload = function () {
|
||||
if (currentWindowOnload) {
|
||||
|
@ -214,7 +214,7 @@ function initializePDFJS(callback) {
|
|||
};
|
||||
|
||||
function extend(destination, source) {
|
||||
for (var property in source) {
|
||||
for (const property in source) {
|
||||
destination[property] = source[property];
|
||||
}
|
||||
return destination;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue