Skip to content

Add TypeScript examples for TESTed - #57

Merged
TomNaessens merged 1 commit into
masterfrom
feature/8847-tested-typescript-examples
Oct 19, 2026
Merged

TomNaessens merged 1 commit into
masterfrom
feature/8847-tested-typescript-examples

Conversation

@TomNaessens

@TomNaessens TomNaessens commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds TypeScript examples for TESTed under tested/typescript/, one runnable Dodona exercise each, with tested/typescript/dirconfig.json setting the language. Each exercise shows one TESTed feature and is typical for the language; the exercises that one suite judges in every language (tested/echo-name, tested/smallest) are in #64.

Exercise Shows
average real-number return values (average(numbers: number[]), TESTed's float comparison, e.g. 1.6666666666666667)
stack objects: create a Stack, push in statements, test size(), peek() and pop()
parse-positive expected exceptions: parsePositive throws an Error with message not a positive number; TESTed checks type and message

Descriptions in en and nl.

Part of https://github.com/dodona-edu/dodona/issues/8847.

Manual testing instructions

  1. In a Dodona dev checkout with seeded data, check out this branch in the local clone of the example repository under data/exercises/ (git fetch && git checkout feature/8847-tested-typescript-examples).
  2. Sign in as zeus (http://dodona.localhost:3000/dev_sign_in/1), open that repository's page and reprocess its activities.
  3. Open the TypeScript exercises ("Average", "Stack", "Parse a positive number") and submit each one's solution/solution.ts: all tests pass.
  4. Edge case: in "Parse a positive number", throw a TypeError instead of an Error: the two valid cases pass, the three exception cases fail.
Verification (dodona-authoring verify skill, ghcr.io/dodona-edu/dodona-tested, universal-judge master)

DSL validation passes for every suite. "en" and "nl" are full runs the way Dodona does them, with that natural_language.

Exercise Reference solution Wrong solution en nl
average 6/6 correct rejected (// wrong: 0 correct) 6/6 6/6
stack 7/7 correct rejected (// wrong: 0 correct) 7/7 7/7
parse-positive 5/5 correct rejected (// wrong: 0 correct; TypeError, another message, or never throwing: the 3 exception cases fail) 5/5 5/5

🤖 Generated with Claude Code

@TomNaessens TomNaessens added the enhancement New feature or request label Oct 19, 2026
@TomNaessens TomNaessens self-assigned this Oct 19, 2026
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-typescript-examples branch from 005d297 to 2281f40 Compare October 19, 2026 16:26
@TomNaessens TomNaessens changed the title Add TypeScript versions of the TESTed examples Add TypeScript examples for TESTed Oct 19, 2026
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-typescript-examples branch from 2281f40 to 987e0a1 Compare October 19, 2026 16:40
@TomNaessens
TomNaessens marked this pull request as ready for review October 19, 2026 19:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TomNaessens
TomNaessens force-pushed the feature/8847-tested-typescript-examples branch from 987e0a1 to aa31287 Compare October 19, 2026 19:29
@TomNaessens
TomNaessens enabled auto-merge October 19, 2026 19:34
@TomNaessens
TomNaessens merged commit 3c44f40 into master Oct 19, 2026
11 checks passed
@TomNaessens
TomNaessens deleted the feature/8847-tested-typescript-examples branch October 19, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants