mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 18:52:48 +00:00
Vitest's expect.poll and vi.waitFor stop after one second by default, a host-speed guess that the project's deadline policy does not see. Under hosted-CI load, kunaProjectConcurrency failed that way twice on unrelated PRs. Another 256 waits relied on the default, and 97 passed literals picked to fit some host. Waits now take as long as their test may run, less the reporting reserve that children already keep. Each Vitest project sets expect.poll's default, and the new waitFor in tests/support/testWait.ts replaces vi.waitFor. Fixture readiness waits (awaitAcknowledgement and the provider process waits) default to the same deadline, and their host-speed literal arguments are removed. One remainingTestDeadline owns the arithmetic for both children and waits. Ten waits whose short timeout was the real check now assert it directly (Kuna version probe, Cutter discovery, doctor and Inspector cancellation, apktool fixture teardown, JADX disconnect): settlement before the production deadline that would otherwise also satisfy the wait, or a deadline pinned beyond every test deadline. The rea/project-wait-deadline lint rule rejects vi.waitFor and explicit expect.poll timeouts. The testing guide and the CI tests audit skill now document the policy. Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
26 lines
1.1 KiB
JavaScript
26 lines
1.1 KiB
JavaScript
import noBufferDeepEquality from "./no-buffer-deep-equality.mjs";
|
|
import cancellationCause from "./cancellation-cause.mjs";
|
|
|
|
import noEvidenceJsonPreadmission from "./rules/no-evidence-json-preadmission.mjs";
|
|
import noFixtureRootCleanup from "./rules/no-fixture-root-cleanup.mjs";
|
|
import noPositionalToolContract from "./rules/no-positional-tool-contract.mjs";
|
|
import noSharedModuleMock from "./rules/no-shared-module-mock.mjs";
|
|
import noLocaleCompare from "./rules/no-locale-compare.mjs";
|
|
import noBabelVisitorKeys from "./rules/no-babel-visitor-keys.mjs";
|
|
import projectWaitDeadline from "./rules/project-wait-deadline.mjs";
|
|
|
|
export default {
|
|
meta: { name: "rea" },
|
|
rules: {
|
|
"no-buffer-deep-equality": noBufferDeepEquality,
|
|
"cancellation-cause": cancellationCause,
|
|
"no-evidence-json-preadmission": noEvidenceJsonPreadmission,
|
|
"no-fixture-root-cleanup": noFixtureRootCleanup,
|
|
"no-positional-tool-contract": noPositionalToolContract,
|
|
"no-shared-module-mock": noSharedModuleMock,
|
|
"no-locale-compare": noLocaleCompare,
|
|
"no-babel-visitor-keys": noBabelVisitorKeys,
|
|
"project-wait-deadline": projectWaitDeadline,
|
|
},
|
|
};
|