Compare commits

..

1 Commits

Author SHA1 Message Date
Maxime Beauchemin
b6cf5ffb84 feat(testing): enforce test() over describe() with grandfathered files
Add ESLint rule to ban describe() usage in favor of test() for better test organization. All 474 existing test files using describe() have been grandfathered with eslint-disable comments to avoid disruption while enforcing the new guideline for future tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-26 13:26:01 -07:00
500 changed files with 2133 additions and 2347 deletions

View File

@@ -1 +1 @@
../AGENTS.md
../LLMS.md

View File

@@ -82,7 +82,6 @@ intro_header.txt
# for LLMs
llm-context.md
AGENTS.md
LLMS.md
CLAUDE.md
CURSOR.md

View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

2
GPT.md
View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

View File

@@ -68,7 +68,7 @@ superset/
### Apache License Headers
- **New files require ASF license headers** - When creating new code files, include the standard Apache Software Foundation license header
- **LLM instruction files are excluded** - Files like AGENTS.md, CLAUDE.md, etc. are in `.rat-excludes` to avoid header token overhead
- **LLM instruction files are excluded** - Files like LLMS.md, CLAUDE.md, etc. are in `.rat-excludes` to avoid header token overhead
### Code Comments
- **Avoid time-specific language** - Don't use words like "now", "currently", "today" in code comments as they become outdated
@@ -102,17 +102,6 @@ superset/
- **`selectOption()`** - Select component helper
- **React Testing Library** - NO Enzyme (removed)
### Test Structure Guidelines
- **Use `test()` instead of `describe()` and `it()`** - Follow the [avoid nesting when testing](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing) principle
- **Why**: Reduces unnecessary nesting, improves test isolation, and makes tests more readable
- **Pattern**: Write flat test files with descriptive test names that fully describe what's being tested
- **Example**: Instead of nested `describe('Component', () => { it('should render', ...) })`, use `test('Component renders correctly', ...)`
- **Benefits**:
- Each test stands alone with a clear, searchable name
- Easier to run individual tests
- Forces you to write more descriptive test names
- Reduces cognitive overhead from nested context switching
### Test Database Patterns
- **Mock patterns**: Use `MagicMock()` for config objects, avoid `AsyncMock` for synchronous code
- **API tests**: Update expected columns when adding new model fields

View File

@@ -349,6 +349,14 @@ module.exports = {
},
],
'no-only-tests/no-only-tests': 'error',
'no-restricted-globals': [
'error',
{
name: 'describe',
message:
'Use test() instead of describe() for better test organization',
},
],
'max-classes-per-file': 0,
// temporary rules to help with migration - please re-enable!
'testing-library/await-async-queries': 0,

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

View File

@@ -1,3 +1,4 @@
/* eslint-disable no-restricted-globals */
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file

Some files were not shown because too many files have changed in this diff Show More