DEV: Minor linting fixes (#16359)

1. `test/run-qunit.js` wasn't eslinted (I'm not adding it to the CI workflow for now, just fixed the issues)
2. "…" utf character isn't rendered correctly in Jenkins, replaced with three dots
3. Don't try to lint `tmp` when doing `eslint .` in the root dir
This commit is contained in:
Jarek Radosz 2022-04-02 21:15:38 +02:00 committed by GitHub
parent b20307377a
commit 9060a045c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -16,3 +16,4 @@ app/assets/javascripts/discourse/tests/test-boot-rails.js
app/assets/javascripts/discourse/tests/fixtures app/assets/javascripts/discourse/tests/fixtures
node_modules/ node_modules/
dist/ dist/
tmp/

View File

@ -82,7 +82,7 @@ task "smoke:test" do
next if api_key.blank? && api_username.blank? && theme_url.blank? next if api_key.blank? && api_username.blank? && theme_url.blank?
puts "Running QUnit tests for theme #{theme_url.inspect} using API key #{api_key[0..3]} and username #{api_username.inspect}" puts "Running QUnit tests for theme #{theme_url.inspect} using API key #{api_key[0..3]}... and username #{api_username.inspect}"
query_params = { query_params = {
seed: Random.new.seed, seed: Random.new.seed,

View File

@ -128,7 +128,7 @@ async function runAllTests() {
const urlObj = new URL(url); const urlObj = new URL(url);
Fetch.requestPaused((data) => { Fetch.requestPaused((data) => {
const requestURL = new URL(data.request.url); const requestURL = new URL(data.request.url);
if (requestURL.hostname != urlObj.hostname) { if (requestURL.hostname !== urlObj.hostname) {
Fetch.continueRequest({ Fetch.continueRequest({
requestId: data.requestId, requestId: data.requestId,
}); });
@ -207,6 +207,7 @@ runAllTests().catch((e) => {
// The following functions are converted to strings // The following functions are converted to strings
// And then sent to chrome to be evaluated // And then sent to chrome to be evaluated
function logQUnit() { function logQUnit() {
const QUnit = window.QUnit;
let testErrors = []; let testErrors = [];
let assertionErrors = []; let assertionErrors = [];
@ -319,6 +320,7 @@ function logQUnit() {
window.qunitDone = context; window.qunitDone = context;
}); });
QUnit.start(); QUnit.start();
} }
let qunit_script = logQUnit.toString(); let qunit_script = logQUnit.toString();