# Behavior traces — jasmine/jasmine

> Canonical page: https://codevetter.com/unpack/jasmine/behavior-traces

# Behavior traces — jasmine/jasmine

Scanned commit 390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf (2026-08-19). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The inspected flows cover Node initialization/reset, browser startup/reruns, spec execution/assertions, and distribution creation. Their order is visible in the source, including branching for focus, exclusions, callback versus promise execution, and suite failures. These are static traces rather than observed execution results.
- Node startup: the package entrypoint requires jasmine.js -> bootJasmine calls core -> jasmine.getEnv creates/caches Env -> interface binds API closures -> module exports globals; installGlobals explicitly copies them to a destination. — [lib/jasmine-core.js#L29-L34](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/lib/jasmine-core.js#L29-L34) [src/core/requireSuffix.js#L7-L14](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/requireSuffix.js#L7-L14) [src/core/requireSuffix.js#L26-L38](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/requireSuffix.js#L26-L38) [src/core/base.js#L71-L78](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/base.js#L71-L78)
- Node reset: reset clears private$.currentEnv_ -> creates an environment with suppressed load errors -> rebindEnv updates the existing API closures; the reset fixture checks new environment identity and declaration routing. — [src/core/requireSuffix.js#L16-L19](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/requireSuffix.js#L16-L19) [src/core/requireInterface.js#L572-L576](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/requireInterface.js#L572-L576) [spec/fixtures/reset.js#L1-L23](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/spec/fixtures/reset.js#L1-L23)
- Browser startup: boot gets Env -> HtmlReporterV2Urls parses current settings -> env.configure applies them -> wrapped window.onload invokes the previous handler -> constructs/adds the HTML reporter -> env.execute starts execution. — [src/boot/boot.js#L3-L25](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/boot/boot.js#L3-L25) [src/html/HtmlReporterV2Urls.js#L35-L65](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/html/HtmlReporterV2Urls.js#L35-L65)
- Declaration and selection: describe immediately invokes its definition callback under a new declaration suite -> it attaches Spec children -> Env.execute installs error handling -> Runner builds the selected/ordered execution tree and awaits jasmineStarted. — [src/core/SuiteBuilder.js#L159-L172](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/SuiteBuilder.js#L159-L172) [src/core/SuiteBuilder.js#L215-L234](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/SuiteBuilder.js#L215-L234) [src/core/Env.js#L413-L430](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Env.js#L413-L430) [src/core/Runner.js#L69-L112](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Runner.js#L69-L112)
- Spec execution: TreeRunner sets the current spec and initializes resources -> awaits specStarted -> runs inherited befores, the spec, and afters -> executionFinished sets duration/status -> resources are cleared -> specDone is awaited; pending/excluded specs omit user functions. — [src/core/TreeRunner.js#L49-L70](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/TreeRunner.js#L49-L70) [src/core/TreeRunner.js#L97-L129](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/TreeRunner.js#L97-L129) [src/core/TreeRunner.js#L250-L263](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/TreeRunner.js#L250-L263)
- Async assertion: expectAsync creates a runnable-bound AsyncExpectation -> wrapAsyncCompare captures a stack and awaits comparison -> Expector.processResult records the result; if another runnable is current, Env additionally records a late-expectation failure on the top suite. — [src/core/Env.js#L265-L278](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Env.js#L265-L278) [src/core/Env.js#L215-L240](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Env.js#L215-L240) [src/core/Expectation.js#L149-L159](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Expectation.js#L149-L159) [src/core/Expector.js#L76-L89](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Expector.js#L76-L89)
- Failure completion: suite execution uses stop-on-first-error or beforeAll-error skipping -> beforeAll failures generate descendant result events -> Runner reports failed, incomplete for focus/no specs, or passed -> awaits jasmineDone -> Env removes global handlers. — [src/core/TreeRunner.js#L238-L286](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/TreeRunner.js#L238-L286) [src/core/Runner.js#L130-L169](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Runner.js#L130-L169) [src/core/Env.js#L428-L430](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Env.js#L428-L430) [src/core/Env.js#L844-L846](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/src/core/Env.js#L844-L846)
- Standalone artifact flow: buildStandaloneDist creates an OS temporary directory -> buildDistribution writes lib outputs -> EJS renders SpecRunner.html -> ZipArchive adds selected assets/examples -> close resolves completion -> finally removes the temporary directory. — [scripts/buildStandaloneDist.js#L9-L28](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/scripts/buildStandaloneDist.js#L9-L28) [scripts/buildStandaloneDist.js#L31-L84](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/scripts/buildStandaloneDist.js#L31-L84) [scripts/lib/buildDistribution.js#L7-L11](https://github.com/jasmine/jasmine/blob/390d31e48106dd0d0b6dbcf5cf9071650fb2b4bf/scripts/lib/buildDistribution.js#L7-L11)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
