Write unit tests #1

Closed
opened 2026-03-05 19:07:06 -06:00 by sam · 6 comments
Owner

Write unit tests that will search for a variety of known information across both OSRS and RS3.

The tests should be written to be resilient to formatting change; keyword matches are sufficient. The main thing we are looking is if key info is contained.

Make sure to check for searching specific sections.

Write unit tests that will search for a variety of known information across both OSRS and RS3. The tests should be written to be resilient to formatting change; keyword matches are sufficient. The main thing we are looking is if key info is contained. Make sure to check for searching specific sections.
Author
Owner

@claude implement this

@claude implement this

Claude encountered an error —— View job


I'll analyze this and get back to you.

**Claude encountered an error** —— [View job](http://100.100.131.50:3000/sam/claude-plugin-runescape/actions/runs/2) --- I'll analyze this and get back to you.
Author
Owner

@claude please implement this

@claude please implement this
Collaborator

Claude encountered an error —— View job


I'll analyze this and get back to you.

**Claude encountered an error** —— [View job](http://100.100.131.50:3000/sam/claude-plugin-runescape/actions/runs/3) --- I'll analyze this and get back to you.
Author
Owner

@claude please implement

@claude please implement
Collaborator

Claude finished @sam's task —— View job


Implementing Unit Tests

  • Gather context (read CLAUDE.md, explore codebase)
  • Understand the plugin's search functionality
  • Check for existing tests (none found)
  • Check for existing claude branch (none found, created new)
  • Write unit tests for OSRS and RS3 searches
  • Write tests for specific section searches
  • Write tests for page fetching (items, quests, skills)
  • Commit and push changes
  • Create PR

Done! Created PR #2 on branch claude/issue-1-write-unit-tests.

Added scripts/rsw/internal/wiki/integration_test.go with 27 tests covering:

  • OSRS search: Dragon scimitar, Abyssal whip, Monkey Madness, Mining training, snippet keyword checks
  • RS3 search: Dragon bones, Plague's End, Blue partyhat, Prayer training
  • OSRS page content: Dragon scimitar (members, attack stats), Abyssal whip (slayer keyword), Monkey Madness quest (requirements), Mining training sections
  • RS3 page content: Dragon bones (prayer keyword), Plague's End quest (elf/requirements)
  • Section fetching: Dragon scimitar combat section, Mining training first section, Prayer training bones/altars section (RS3), Slayer masters section (RS3)
  • Unit tests (no network): FindSectionIndex found/not-found/empty cases

All assertions use case-insensitive substring/keyword matching so they're resilient to wiki formatting changes.

Branch: claude/issue-1-write-unit-tests

**Claude finished @sam's task** —— [View job](http://100.100.131.50:3000/sam/claude-plugin-runescape/actions/runs/5) --- ### Implementing Unit Tests - [x] Gather context (read CLAUDE.md, explore codebase) - [x] Understand the plugin's search functionality - [x] Check for existing tests (none found) - [x] Check for existing claude branch (none found, created new) - [x] Write unit tests for OSRS and RS3 searches - [x] Write tests for specific section searches - [x] Write tests for page fetching (items, quests, skills) - [x] Commit and push changes - [x] Create PR --- Done! Created PR [#2](https://git.samlab.cloud/sam/claude-plugin-runescape/pulls/2) on branch `claude/issue-1-write-unit-tests`. Added `scripts/rsw/internal/wiki/integration_test.go` with **27 tests** covering: - **OSRS search:** Dragon scimitar, Abyssal whip, Monkey Madness, Mining training, snippet keyword checks - **RS3 search:** Dragon bones, Plague's End, Blue partyhat, Prayer training - **OSRS page content:** Dragon scimitar (members, attack stats), Abyssal whip (slayer keyword), Monkey Madness quest (requirements), Mining training sections - **RS3 page content:** Dragon bones (prayer keyword), Plague's End quest (elf/requirements) - **Section fetching:** Dragon scimitar combat section, Mining training first section, Prayer training bones/altars section (RS3), Slayer masters section (RS3) - **Unit tests (no network):** `FindSectionIndex` found/not-found/empty cases All assertions use case-insensitive substring/keyword matching so they're resilient to wiki formatting changes. Branch: [`claude/issue-1-write-unit-tests`](https://git.samlab.cloud/sam/claude-plugin-runescape/src/branch/claude/issue-1-write-unit-tests)
sam closed this issue 2026-03-05 20:09:39 -06:00
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/claude-plugin-runescape#1