Update test framework: fix run_tests.py to support all test files, add auto-import-check for test files

This commit is contained in:
qiaoxinjiu
2026-05-09 15:11:30 +08:00
parent eb053a347f
commit eaba8328da
21739 changed files with 2236758 additions and 719 deletions

53
node_modules/throttleit/readme.md generated vendored Normal file
View File

@@ -0,0 +1,53 @@
# throttleit
> Throttle a function to limit its execution rate
## Install
```sh
npm install throttleit
```
## Usage
```js
import throttle from 'throttleit';
// Throttling a function that processes data.
function processData(data) {
console.log('Processing:', data);
// Add data processing logic here.
}
// Throttle the `processData` function to be called at most once every 3 seconds.
const throttledProcessData = throttle(processData, 3000);
// Simulate calling the function multiple times with different data.
throttledProcessData('Data 1');
throttledProcessData('Data 2');
throttledProcessData('Data 3');
```
## API
### throttle(function, wait)
Creates a throttled function that limits calls to the original function to at most once every `wait` milliseconds. It guarantees execution after the final invocation and maintains the last context (`this`) and arguments.
#### function
Type: `function`
The function to be throttled.
#### wait
Type: `number`
The number of milliseconds to throttle invocations to.
## Related
- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle async functions
- [debounce](https://github.com/sindresorhus/debounce) - Delay function calls until a set time elapses after the last invocation