Skip to content

test: declare table fields with @Field decorator in test fixtures - #9

Merged
Upd4ting merged 1 commit into
mainfrom
test/field-decorators-fixtures
Jul 8, 2026
Merged

test: declare table fields with @Field decorator in test fixtures#9
Upd4ting merged 1 commit into
mainfrom
test/field-decorators-fixtures

Conversation

@Upd4ting

@Upd4ting Upd4ting commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add @Field(...) decorators to the table fixtures in schema.test.ts and the modifier tests (common, encryption, hash, localization)
  • Aligns the remaining non-decorated fixtures with the style already used in model.test.ts, relation.test.ts and table.test.ts
  • No assertion or test behavior changed

Test plan

pnpm test → 96 passing, 0 failing

https://claude.ai/code/session_016dBZTZJnv6S9vU2jfzeUSK

Greptile Summary

This PR adds @Field(...) decorators to test fixture classes that were previously missing them in schema.test.ts and the four modifier test files (common, encryption, hash, localization). No test assertions or behavior are changed.

  • All changed files simply add @Field(\"string\"), @Field(\"number\"), or @Field(\"any\") above each bare class-field declaration, and update the relevant imports to include Field.
  • The decorator ordering in files that stack multiple decorators (e.g. @Encrypted@Field) is consistent with the existing pattern in table.test.ts (@Index@Field).

Confidence Score: 5/5

All changes are confined to test fixtures and add no production logic — safe to merge.

The change is purely additive in test files: it decorates previously bare field declarations with @field(type) and updates the corresponding imports. No assertions, logic, or production code are touched.

No files require special attention.

Important Files Changed

Filename Overview
src/tests/schema.test.ts Adds @field("string") and @field("number") to bare field declarations in three test fixtures; imports updated accordingly.
src/tests/modifiers/common.test.ts Adds @field("string") and @field("number") to all bare fields across five test functions; Field added to import.
src/tests/modifiers/encryption.test.ts Adds @field("string") or @field("any") below each @Encrypted decorator across eight test fixtures; Field added to import.
src/tests/modifiers/hash.test.ts Adds @field("string") below @Hashed in two test fixtures; Field added to import.
src/tests/modifiers/localization.test.ts Adds @field("string") below @Localized across five field declarations in three test fixtures; Field added to import.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Class field declaration\n(declare / !)"] --> B{"Has domain-specific\ndecorator?"}
    B -- Yes --> C["@Encrypted / @Hashed\n@Localized / @Index"]
    B -- No --> D["@Field(type)"]
    C --> D
    D --> E["Field registered in\ntable metadata"]
    E --> F["Tests can assert on\nfield type / behavior"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["Class field declaration\n(declare / !)"] --> B{"Has domain-specific\ndecorator?"}
    B -- Yes --> C["@Encrypted / @Hashed\n@Localized / @Index"]
    B -- No --> D["@Field(type)"]
    C --> D
    D --> E["Field registered in\ntable metadata"]
    E --> F["Tests can assert on\nfield type / behavior"]
Loading

Reviews (1): Last reviewed commit: "test: declare table fields with @Field d..." | Re-trigger Greptile

@Upd4ting
Upd4ting merged commit dea8125 into main Jul 8, 2026
3 checks passed
@Upd4ting
Upd4ting deleted the test/field-decorators-fixtures branch July 8, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant