The Life Starter
0 of 6 complete0%
Course Library · Lesson 5 of 6
Create · Guided lesson

Test reachability and restart

About 35 minutes · 7 reading + 28 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
See this course’s project requirements

An original local browser story with six passages, three endings, meaningful choice consequences, reachable-state tests and a complete text reading alternative.

Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.

What to include

  • Write six complete passages and three reachable endings.
  • Give choices different narrative consequences with stable targets.
  • Trace hasMap and history consistently and reset all state.
  • Run or honestly scope four path/invalid choice/restart checks.
  • Deliver working relative assets and all-route text companion.

Review and revise

Use these criteria to check your work and choose what to improve.

  • Narrative: choices affect later text/outcomes.
  • Continuity: incoming facts and item effects are coherent.
  • Engine: stable target/restart/path checks are correct.
  • Access/evidence: reading alternative and actual test scope are clear.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

The pack’s Node.js assertion file tests 4 complete paths, 6 visited passages and 3 terminal endings. It also checks map continuity, restart and invalid indexes. Running it validates the pure engine; the browser render and keyboard journey need separate interaction checks. Keep these distinctions in your test log.

The idea

A graph claim needs execution or an explicitly scoped paper trace.

Follow along

Test reachability and restart — worked practice

A graph claim needs execution or an explicitly scoped paper trace.

Original paths:[0, 0]→OPEN;[0, 1]→CLOSED;[1, 0]→CLOSED;[1, 1]→RETURN. Index−1, 2 or 0.5 at START is rejected. All four valid paths finish after two choices. If a change renames an ending without updating its target, the missing-passage guard raises an error and the reachability claim must not pass.

  1. 1. 5.1 Test

    Run “node test_story.cjs” in the folder containing engine.js, or complete an explicit paper trace if Node is unavailable. Record which actually ran.

    You should see: Actual engine test run or method limitation is reported.

  2. 2. 5.2 Test

    Reconcile the 4 paths with 6 unique visited passages and 3 endings. Do not count CLOSED twice as two distinct endings.

    You should see: Counts distinguish routes/passages/endings.

  3. 3. 5.3 Test

    Open index.html in a browser where available and exercise each choice, Restart and keyboard focus. Confirm the visible heading/content changes, not only that files load.

    You should see: Browser interaction is a separate performed check.

  4. 4. 5.4 Test

    Introduce and repair one bad target in a copy. Re-run the engine and affected browser check; report any unavailable browser route as unverified.

    You should see: Bad target does not silently pass.

Now change one thing

A changed test enumerates five complete routes ending SUN, RAIN, SUN, HOME, NIGHT. How many distinct terminal ending IDs were reached?

Your work

What to finish

A path/state/regression log and one bug repair note.

Common mistake

Watch for this

Treating a pure engine assertion or HTTP200 as proof of browser interaction.

How can I tell I understand it?

You can reproduce every ending and separate engine from UI evidence.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1What does a passing test_story.cjs establish?
2Which index is invalid at the 2-choice START?
3A file loads but clicking does nothing. Which check is needed?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
5
Finish this lesson

Pass the check. We’ll save the progress.

Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.

Go to the knowledge check
Tools, templates, and lesson sources

Tools and templates

Tools open in a new tab so you can keep your place here.

Sources and further reading

Explore the references behind this lesson.

MDN: getElementById
Source & access notes · checked 2026-10-01

Read unique case-sensitive IDs and null on missing match; original story container IDs differ from source examples.

Access: Public page text or PDF was opened and read through the web reader on 2026-10-01; no signup required for reading.

Reuse: Linked for further study. All LifeStarter scenarios, samples, assets and assessments are original; no source exercises or artwork are copied.

MDN: textContent
Source & access notes · checked 2026-10-01

Read textContent versus raw HTML behavior and plain-text rendering recommendation; no network/user account saving in original story.

Access: Public page text or PDF was opened and read through the web reader on 2026-10-01; no signup required for reading.

Reuse: Linked for further study. All LifeStarter scenarios, samples, assets and assessments are original; no source exercises or artwork are copied.

MDN: Working with Objects
Source & access notes · checked 2026-10-01

Read own object keys, case-sensitive property access and object literal semantics; original story data/code supplied.

Access: Public page text or PDF was opened and read through the web reader on 2026-10-01; no signup required for reading.

Reuse: Linked for further study. All LifeStarter scenarios, samples, assets and assessments are original; no source exercises or artwork are copied.

Report a problem with this lesson

Tell us what went wrong. Please leave out personal information and private project contents.

No sign-in needed.