mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 17:21:05 +00:00
feat(CI): modular testing and linting system + cursor rule
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @jest-environment jsdom
|
||||
*/
|
||||
import { runGlobalSearchSelfTests } from "./selfTests";
|
||||
|
||||
describe("globalSearch selfTests", () => {
|
||||
it("all in-process cases pass", async () => {
|
||||
const report = await runGlobalSearchSelfTests();
|
||||
expect(report.failed).toBe(0);
|
||||
expect(report.failures).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -22,12 +22,10 @@ import {
|
||||
/**
|
||||
* Lightweight in-process self-tests for the global-search overhaul.
|
||||
*
|
||||
* The repository does not (yet) ship with a test runner, so we instead
|
||||
* expose a deterministic suite of assertions over the pure helpers that
|
||||
* back active jobs and the passive observer. This is intentionally
|
||||
* dependency-free so it can run inside the extension page (`window.
|
||||
* globalSearchDebug.runSelfTests()`) and from any future Vitest harness
|
||||
* without modification.
|
||||
* Exposes a deterministic suite of assertions over the pure helpers that
|
||||
* back active jobs and the passive observer. Runs in Jest via
|
||||
* `selfTests.test.ts`, and inside the extension page via
|
||||
* `window.globalSearchDebug.runSelfTests()`.
|
||||
*/
|
||||
|
||||
interface TestCase {
|
||||
|
||||
@@ -141,7 +141,7 @@ export function htmlToPlainText(rawHtml: string): string {
|
||||
}
|
||||
});
|
||||
|
||||
let text = body.innerText || "";
|
||||
let text = body.textContent || body.innerText || "";
|
||||
|
||||
text = text
|
||||
.replace(/\u00A0/g, " ")
|
||||
|
||||
Reference in New Issue
Block a user