diff --git a/devtools/server/tests/unit/test_profiler_bufferstatus.js b/devtools/server/tests/unit/test_profiler_bufferstatus.js index df1eda2af330..54d3a32ce1a0 100644 --- a/devtools/server/tests/unit/test_profiler_bufferstatus.js +++ b/devtools/server/tests/unit/test_profiler_bufferstatus.js @@ -13,6 +13,7 @@ const INITIAL_WAIT_TIME = 100; // ms const MAX_WAIT_TIME = 20000; // ms const MAX_PROFILER_ENTRIES = 10000000; +// eslint-disable-next-line no-unused-vars function run_test() { // Ensure the profiler is not running when the test starts (it could // happen if the MOZ_PROFILER_STARTUP environment variable is set). diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js index 92a72c5e3dd0..a72027970411 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js @@ -517,10 +517,11 @@ module.exports = { * Test type: xpcshell, browser, chrome, mochitest */ getTestType(scope) { + let testTypes = ["browser", "xpcshell", "chrome", "mochitest", "a11y"]; let manifest = this.getTestManifest(scope); if (manifest) { let name = path.basename(manifest); - for (let testType of ["browser", "xpcshell", "chrome", "mochitest"]) { + for (let testType of testTypes) { if (name.startsWith(testType)) { return testType; } @@ -535,9 +536,18 @@ module.exports = { } if (filename.startsWith("test_")) { - return "xpcshell"; + let parent = path.basename(path.dirname(filepath)); + for (let testType of testTypes) { + if (parent.startsWith(testType)) { + return testType; + } + } + + // It likely is a test, we're just not sure what kind. + return "unknown"; } + // Likely not a test return null; },