Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apps/oxlint/conformance/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ TESTING_LIBRARY_SHA="b8ef3772487a32c886cb5c338da2a144560a437b" # 7.15.4
STORYBOOK_SHA="99aa48989f6798ae24d9867bc2b5fe6991a2e341" # v10.3.0-alpha.12
PLAYWRIGHT_SHA="7e16bd565cfccd365a6a8f1f7f6fe29a1c868036" # v2.9.0
CYPRESS_SHA="de98a5de648694518873ad85b41250e40a67be95" # v6.2.0
MOCHA_SHA="1e5a3a1a9597ab54e5cc3d3fc58071009d0335d3" # v11.1.0

# Shallow clone a repo at a specific commit, and `cd` into the cloned directory.
# Git commands copied from `.github/scripts/clone-parallel.mjs`.
Expand Down Expand Up @@ -244,3 +245,16 @@ npm install

# Return to `submodules` directory
cd ..

###############################################################################
# Mocha
###############################################################################

# Clone `eslint-plugin-mocha` repo into `submodules/mocha`
clone mocha https://github.com/lo1tuma/eslint-plugin-mocha.git "$MOCHA_SHA"

# Install dependencies
npm install

# Return to `submodules` directory
cd ..
54 changes: 54 additions & 0 deletions apps/oxlint/conformance/snapshots/mocha.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Conformance test results - mocha

## Summary

### Rules

| Status | Count | % |
| ----------------- | ----- | ------ |
| Total rules | 24 | 100.0% |
| Fully passing | 24 | 100.0% |
| Partially passing | 0 | 0.0% |
| Fully failing | 0 | 0.0% |
| Load errors | 0 | 0.0% |
| No tests run | 0 | 0.0% |

### Tests

| Status | Count | % |
| ----------- | ----- | ------ |
| Total tests | 825 | 100.0% |
| Passing | 825 | 100.0% |
| Failing | 0 | 0.0% |
| Skipped | 0 | 0.0% |

## Fully Passing Rules

- `consistent-interface` (9 tests)
- `consistent-spacing-between-blocks` (17 tests)
- `handle-done-callback` (42 tests)
- `max-top-level-suites` (37 tests)
- `no-async-suite` (16 tests)
- `no-empty-title` (51 tests)
- `no-exclusive-tests` (44 tests)
- `no-exports` (31 tests)
- `no-global-tests` (40 tests)
- `no-hooks-for-single-case` (35 tests)
- `no-hooks` (29 tests)
- `no-identical-title` (28 tests)
- `no-mocha-arrows` (26 tests)
- `no-nested-tests` (20 tests)
- `no-pending-tests` (45 tests)
- `no-return-and-callback` (44 tests)
- `no-return-from-async` (27 tests)
- `no-setup-in-describe` (65 tests)
- `no-sibling-hooks` (32 tests)
- `no-synchronous-tests` (45 tests)
- `no-top-level-hooks` (31 tests)
- `prefer-arrow-callback` (67 tests)
- `valid-suite-title` (17 tests)
- `valid-test-title` (27 tests)

## Rules with Failures

No rules with failures
2 changes: 2 additions & 0 deletions apps/oxlint/conformance/src/groups/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import testingLibrary from "./testing_library.ts";
import storybook from "./storybook.ts";
import playwright from "./playwright.ts";
import cypress from "./cypress.ts";
import mocha from "./mocha.ts";

export const TEST_GROUPS: TestGroup[] = [
eslint,
Expand All @@ -20,4 +21,5 @@ export const TEST_GROUPS: TestGroup[] = [
storybook,
playwright,
cypress,
mocha,
];
19 changes: 19 additions & 0 deletions apps/oxlint/conformance/src/groups/mocha.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { TestGroup } from "../index.ts";

const group: TestGroup = {
name: "mocha",

submoduleName: "mocha",
testFilesDirPath: "source/rules",

transformTestFilename(filename: string) {
if (!filename.endsWith(".test.ts")) return null;
return filename.slice(0, -".test.ts".length);
},

ruleTesters: [{ specifier: "eslint", propName: "RuleTester" }],

parsers: [],
};

export default group;
Loading