aaronsb_obsidian-mcp-plugin/tests
Aaron Bockelie 5cdd131c41 test(bases): differential corpus + new Function baseline for ADR-201
PR1 of 2 for #180 (ADR-201). Lands the regression net independently of
library choice, against the *current* `new Function` evaluator as the
behavioural oracle.

- Expand tests/fixtures/base-corpus.ts: EVAL_CASES (~57 expr/expected
  pairs spanning every operator class + every fn/property the evaluator
  exposes), makeNoteContext() canonical fixed context, SECURITY_EXPRESSIONS
  (sandbox-escape set). FILTER_EXPRESSIONS kept as a derived export.
- tests/bases-expression-evaluator.test.ts: locks current behaviour over
  the corpus AND proves the live RCE — constructor.constructor reaches the
  Function constructor through the `with` scope chain (returns 2/42/99
  today). PR2 inverts the SECURITY block.

Time-dependent primitives (now/today) appear only inside relations stable
for all wall-clock times, so expectations never rot.

209/209 tests pass; build + lint clean.

Refs #180, ADR-201
2026-05-16 17:05:26 -05:00
..
__mocks__ fix(vault): Recurse listFiles into subfolders (#154) 2026-05-15 13:16:45 -05:00
fixtures test(bases): differential corpus + new Function baseline for ADR-201 2026-05-16 17:05:26 -05:00
security fix(tls): drop inert rejectUnauthorized:false default, clears scorecard Risk 2026-05-16 11:59:51 -05:00
validation test: Add comprehensive unit tests for input validation 2025-12-03 12:55:01 -06:00
bases-expression-evaluator.test.ts test(bases): differential corpus + new Function baseline for ADR-201 2026-05-16 17:05:26 -05:00
bases-yaml.test.ts test(bases): address #182 review — accurate date-safety rationale + explicit divergences 2026-05-16 14:20:23 -05:00
dataview-integration.test.ts fix(dataview): serialize Luxon dates and propagate Dataview-internal errors 2026-05-15 15:00:11 -05:00
graph-search-traversal.test.ts fix: Fix test failures by properly mocking TFile class 2025-07-05 10:37:24 -05:00
list-files-recursive.test.ts fix(vault.list): Align paginated recursive sort with flat listFiles 2026-05-15 13:40:35 -05:00
mcp-server.test.ts fix: Mock fs module in tests to prevent certificate directory creation (v0.9.0a) 2025-08-12 10:52:39 -05:00
patch-operations.test.ts feat: Implement structured patch targeting for headings, blocks, and frontmatter 2025-07-06 22:47:02 -05:00
read-only-mode.test.ts refactor: Remove concurrent mode toggle, simplify connection setup (ADR-100) 2026-03-14 23:13:35 -05:00
recursive-copy.test.ts fix: Eliminate all eslint any-type violations for Obsidian plugin review 2026-02-03 21:51:55 -06:00
search-tag-operator.test.ts feat: add tests for searches with the tag operator 2025-08-16 15:46:55 +01:00
setup.ts feat: Add linting, testing, and development documentation 2025-06-27 11:18:36 -05:00