### Installing Dependencies for elm-spec (Lerna Monorepo) Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command sequence installs all project dependencies. 'npm install' handles top-level dependencies, and 'npx lerna bootstrap' links local packages within the monorepo. ```Shell $ npm install $ npx lerna bootstrap ``` -------------------------------- ### Installing Karma Elm Spec Framework Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/karma-elm-spec-framework/README.md Installs Karma, Karma Chrome Launcher, and the Karma Elm Spec Framework plugin as development dependencies using npm. This command should be run in your project's root directory after setting up your elm-spec specs. ```Shell $ npm install --save-dev karma karma-chrome-launcher karma-elm-spec-framework ``` -------------------------------- ### Instantiating Elm-Spec Compiler (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This code shows how to create a new `Compiler` instance, configuring it with various options. Key parameters include `cwd` for the compilation directory, `specPath` (required) for locating spec modules, `elmPath` for the Elm executable, and `logLevel` to control output verbosity. This setup is crucial for preparing Elm code for execution within the test runner. ```JavaScript new Compiler({ // Switch to the given directory for compilation; must contain an elm.json file. // By default, the current working directory is `process.cwd()` cwd: './specs', // Glob that specifies how to find spec modules, relative to the current working directory // (REQUIRED) specPath: './**/*Spec.elm', // Path to the elm executable // By default, the compiler uses the `elm` executable in the current path elmPath: './node_modules/.bin/elm', // Log level // By default, the compiler prints all log output // Compiler.LOG_LEVEL.ALL -- will print info and errors // Compiler.LOG_LEVEL.QUIET -- will only print compiler errors // Compiler.LOG_LEVEL.SILENT -- will print nothing at all logLevel: Compiler.LOG_LEVEL.QUIET }) ``` -------------------------------- ### Configuring Karma for Elm Spec Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/karma-elm-spec-framework/README.md Provides an example `karma.conf.js` configuration for integrating Karma with `elm-spec`. It defines the `elm-spec` framework, sets optional `elmSpec` properties for the spec root, glob patterns, and Elm executable path, configures client-side options like `endOnFailure`, specifies files to watch, sets up the `elm-spec` preprocessor, and uses the `elm-spec` reporter for output. ```JavaScript frameworks: ['elm-spec'], // Optional elm-spec configuration elmSpec: { // Root directory for your specs; must contain elm.json. // By default this is './specs' cwd: './my-specs', // A glob to locate your spec modules, relative to the current // working directory. // By default, this is './**/*Spec.elm' specs: './SpecificBehavior/**/*Spec.elm', // Path to the elm executable // By default, this looks for elm on your path pathToElm: '/some/path/to/elm' }, client: { // Optional elm-spec configuration elmSpec: { // End the spec suite run on the first failure. // This is helpful to turn on when debugging failures, as you'll be able // to see and interact with the program under test (on the Karma debug // page) when a spec fails in the browser Karma is controling. // By default, this is false. endOnFailure: true, } }, // These files will be watched for changes by Karma. // When they change, the elm files will be recompiled. // Tell Karma not to serve these files; the elm-spec framework takes care of // compiling and loading the correct files into the browser. files: [ { pattern: 'src/elm/*.elm', included: false, served: false }, { pattern: 'specs/**/*Spec.elm', included: false, served: false } ], // This ensures any changed elm files will trigger the spec files to be recompiled. preprocessors: { "**/*.elm": [ "elm-spec" ], }, // For best results, use the included elm-spec reporter. reporters: ['elm-spec'] ``` -------------------------------- ### Installing elm-spec-runner CLI Tool Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-runner/README.md This command installs the `elm-spec-runner` package as a development dependency in your Node.js project using npm. It provides the command-line interface for running Elm-Spec test suites. ```Shell npm install --save-dev elm-spec-runner ``` -------------------------------- ### Installing Verdaccio Local npm Registry Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command globally installs Verdaccio, a lightweight private npm proxy registry, which can be used for local prerelease testing of Node.js packages. ```Shell $ npm install -g verdaccio ``` -------------------------------- ### Installing Canary Package from Local Verdaccio Registry Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command installs a specific package ('elm-spec-runner') with its 'canary' tag from the local Verdaccio registry, allowing developers to test prerelease versions. ```Shell npm install --save-dev elm-spec-runner@canary --registry http://localhost:4873/ ``` -------------------------------- ### Initializing elm-spec-harness Compiler in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-harness/README.md This snippet demonstrates how to create a new instance of the `Compiler` object from `elm-spec-harness`. It configures the compilation process by specifying the current working directory (`cwd`), the glob pattern for harness modules (`harnessPath`), the path to the Elm executable (`elmPath`), and the desired logging level (`logLevel`). This setup is crucial before attempting to compile any Elm code. ```JavaScript const Compiler = require('elm-spec-harness/compiler') const compiler = new Compiler({ // Switch to the given directory for compilation; must contain an elm.json file. // By default, the current working directory is `process.cwd()` cwd: './specs', // Glob that specifies how to find harness modules, relative to the current working directory // (REQUIRED) harnessPath: './**/Harness.elm', // Path to the elm executable // By default, the compiler uses the `elm` executable in the current path elmPath: './node_modules/.bin/elm', // Log level // By default, the compiler prints all log output // Compiler.LOG_LEVEL.ALL -- will print info and errors // Compiler.LOG_LEVEL.QUIET -- will only print compiler errors // Compiler.LOG_LEVEL.SILENT -- will print nothing at all logLevel: Compiler.LOG_LEVEL.QUIET }) ``` -------------------------------- ### Running Elm-Spec Tests with npx Source: https://github.com/brian-watkins/elm-spec/blob/master/README.md This command executes the `elm-spec` test suite using `npx`, which allows running executables from npm packages without explicitly installing them globally. By default, it runs specs in a JSDOM environment, assuming specs are located in a `./specs` directory. ```Bash $ npx elm-spec ``` -------------------------------- ### Installing Elm-Spec Runner via npm Source: https://github.com/brian-watkins/elm-spec/blob/master/README.md This command installs the `elm-spec-runner` package as a development dependency using npm. This runner is required to execute `elm-spec` tests in either a JSDOM environment or a real browser from the command line. ```Bash $ npm install --save-dev elm-spec-runner ``` -------------------------------- ### Instantiating SuiteRunner (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet shows how to create a new `SuiteRunner` instance. It requires an `elmContext` (an `ElmContext` instance), a `reporter` object for reporting test results, an `options` object for configuration (e.g., `endOnFailure`), and a `version` string (primarily for testing purposes). The `SuiteRunner` orchestrates the execution of Elm-Spec programs. ```JavaScript new SuiteRunner(elmContext, reporter, options, version) ``` -------------------------------- ### Instantiating ProgramRunner in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet demonstrates how to create a new instance of the `ProgramRunner` class. It requires an initialized Elm program (`app`), an `elmContext`, and an `options` object (similar to `SuiteRunner`'s options) to configure its behavior for running spec programs. ```JavaScript new ProgramRunner(app, elmContext, options) ``` -------------------------------- ### Writing an HTML Interaction Spec with Elm-Spec Source: https://github.com/brian-watkins/elm-spec/blob/master/README.md This Elm module demonstrates how to write a spec for an HTML-based Elm program using `elm-spec`. It sets up a scenario to test button clicks, observing the DOM for expected text changes. It uses `Spec.Setup` for initialization, `Spec.Markup` for DOM interaction, and `Spec.Claim` for assertions, integrating with the `Runner` module. ```Elm module SampleSpec exposing (main) import Spec exposing (..) import Spec.Setup as Setup import Spec.Markup as Markup import Spec.Markup.Selector exposing (..) import Spec.Markup.Event as Event import Spec.Claim as Claim import Runner import Main as App clickSpec : Spec App.Model App.Msg clickSpec = describe "an html program" [ scenario "a click event" ( given ( Setup.initWithModel App.defaultModel |> Setup.withUpdate App.update |> Setup.withView App.view ) |> when "the button is clicked three times" [ Markup.target << by [ id "my-button" ] , Event.click , Event.click , Event.click ] |> it "renders the count" ( Markup.observeElement |> Markup.query << by [ id "count-results" ] |> expect ( Claim.isSomethingWhere <| Markup.text <| Claim.isStringContaining 1 "You clicked the button 3 time(s)" ) ) ) ] main = Runner.browserProgram [ clickSpec ] ``` -------------------------------- ### Configuring ESBuild for Bundle Analysis Metafile Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This JavaScript snippet demonstrates how to modify an ESBuild configuration to include 'metafile: true', which generates a 'meta.json' file containing detailed information about the build bundle for analysis tools like Bundle Buddy. ```JavaScript const result = await esbuild.build({ ... }) fs.writeFileSync("meta.json", JSON.stringify(result.metafile)) ``` -------------------------------- ### Importing Core Modules for Elm-Spec (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet demonstrates how to import the main components of the `elm-spec-core` library in a Node.js environment. It uses destructuring to import `ElmContext`, `SuiteRunner`, and `ProgramRunner` from the main package, and `Compiler` from a sub-path. These modules are essential for setting up and running Elm-Spec test suites. ```JavaScript const { ElmContext, SuiteRunner, ProgramRunner } = require('elm-spec-core') const Compiler = require('elm-spec-core/compiler') ``` -------------------------------- ### SuiteRunner Completion Event (Ok) (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet shows the object emitted by the `complete` event when `runAll` or `runSegment` successfully executes all scenarios. The `status` property is `"Ok"`, and a summary of results is provided, including the counts of `accepted`, `rejected`, and `skipped` scenarios. ```JavaScript { status: "Ok", // A summary of the results is provided. accepted: 1, rejected: 1, skipped: 0 } ``` -------------------------------- ### Versioning Packages with Lerna for Publishing Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This Lerna command interactively prompts for new versions for each package, updates their package.json files, creates a commit, and pushes new release tags to Git, excluding private modules. ```Shell npx lerna version --no-private ``` -------------------------------- ### Running Tests for elm-spec Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This standard npm command executes all defined tests for the 'elm-spec' project, typically configured in the package.json scripts. ```Shell $ npm test ``` -------------------------------- ### Running Spec Program with ProgramRunner Instance Method in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md The `programRunner.run()` instance method executes the Elm spec program that was provided during the `ProgramRunner`'s instantiation. This method emits various events such as `observation`, `error`, `log`, and `complete` to report on the program's execution status and results. ```JavaScript programRunner.run() ``` -------------------------------- ### Configuring Elm-Spec Runner Module in Elm Source: https://github.com/brian-watkins/elm-spec/blob/master/README.md This Elm module defines the necessary ports and configuration for `elm-spec` to interact with the Elm runtime. It exposes `program`, `browserProgram`, `skip`, and `pick` functions, which are essential for running and managing specs. The `elmSpecOut` and `elmSpecIn` ports handle message communication, while `elmSpecPick` is used for selectively running scenarios. ```Elm port module Runner exposing ( program , browserProgram , skip , pick ) import Spec exposing (Message) port elmSpecOut : Message -> Cmd msg port elmSpecIn : (Message -> msg) -> Sub msg port elmSpecPick : () -> Cmd msg config : Spec.Config msg config = { send = elmSpecOut , listen = elmSpecIn } pick = Spec.pick elmSpecPick skip = Spec.skip program = Spec.program config browserProgram = Spec.browserProgram config ``` -------------------------------- ### Compiling Elm Code with elm-spec-harness in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-harness/README.md This snippet shows how to trigger the compilation of Elm code using the `compile()` method of the previously initialized `Compiler` instance. This method executes the Elm compiler based on the configured options and returns the compiled Elm code, typically as a string, which can then be evaluated in a browser environment. ```JavaScript const compiledElmCode = compiler.compile() ``` -------------------------------- ### Instantiating ElmContext (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet demonstrates how to create an instance of `ElmContext`. It requires a `window` object, which is a reference to the DOM window where the compiled Elm code will be evaluated. This context is essential for interacting with the Elm runtime within the browser environment. ```JavaScript new ElmContext(window) ``` -------------------------------- ### Publishing Packages to npm with Lerna Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This Lerna command publishes the latest tagged releases of the monorepo's packages to the npm registry, based on the Git tags created during the versioning step. ```Shell npx lerna publish from-git ``` -------------------------------- ### ElmContext File Loading Capability Arguments (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This object defines the expected arguments for the `capability` function passed to `ElmContext#registerFileLoadingCapability`. It specifies the `path` to the file to be loaded and a `convertToText` boolean flag, which determines if the file content should be resolved as text or a buffer. ```JavaScript { path: "some path to file", convertToText: true } ``` -------------------------------- ### Configuring Verdaccio for elm-spec Packages Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This YAML configuration snippet for Verdaccio explicitly defines access and publish rules for 'elm-spec-core' and 'elm-spec-runner', allowing local publishing and disabling proxying to the public npm registry. ```YAML packages: 'elm-spec-core': access: $all publish: $all unpublish: $authenticated # proxy: npmjs 'elm-spec-runner': access: $all publish: $all unpublish: $authenticated # proxy: npmjs ``` -------------------------------- ### SuiteRunner Instance Options (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet defines the `options` object used when instantiating `SuiteRunner`. The `endOnFailure` property, when set to `true`, configures the test suite to stop execution immediately after the first test failure is encountered. ```JavaScript { // stop the test suite run after the first failure endOnFailure: true, } ``` -------------------------------- ### Creating Git Tag for New Release Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This Git command creates a lightweight, annotated tag for the current commit, marking it with the new release version (e.g., 1.1.0). ```Shell git tag 1.1.0 ``` -------------------------------- ### ElmContext File Loading Capability Success (Text) (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet shows the expected resolution format for the promise returned by the file loading `capability` when `convertToText` is `true`. It includes the absolute `path` to the file and its content as a `text` string. ```JavaScript { path: "the absolute path to the file", text: "the text of the file" } ``` -------------------------------- ### Executing Elm-Spec Suites via CLI Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-runner/README.md This is the primary command to run your Elm-Spec test suites from the command line. By default, it executes specs in JSDOM, but can be configured with various options to use real browsers or a remote environment. The command will exit with a non-zero code if any observations are rejected or an error occurs. ```Shell elm-spec [options] ``` -------------------------------- ### Configuring Verdaccio for Docker Access Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This configuration line in Verdaccio's 'config.yaml' allows the registry to listen on all network interfaces, making it accessible from within a Docker container at a specified host address. ```YAML listen: 0.0.0.0:4873 ``` -------------------------------- ### ElmContext File Loading Capability Success (Buffer) (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet shows the expected resolution format for the promise returned by the file loading `capability` when `convertToText` is `false`. It includes the absolute `path` to the file and its content as a `buffer` object containing a `data` array of byte values. ```JavaScript { path: "the absolute path to the file", buffer: { data: [1, 2, 3] } } ``` -------------------------------- ### Publishing Canary Release to Local Verdaccio Registry Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This Lerna command publishes the latest code with a special 'canary' tag to the specified local Verdaccio registry, useful for testing unreleased changes. ```Shell npx lerna publish --canary --registry http://localhost:4873/ ``` -------------------------------- ### Bumping Elm Version for Publishing Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command automatically determines the correct semantic versioning for the Elm package and updates the 'elm.json' file accordingly, but does not push these changes to Git. ```Shell npx elm bump ``` -------------------------------- ### Checking Compilation Status with elm-spec-harness in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-harness/README.md This snippet illustrates how to retrieve the current compilation status using the `status()` method of the `Compiler` object. The returned `status` variable will hold one of the predefined `Compiler.STATUS` constants, indicating whether compilation is ready, no files were found, compilation succeeded, or compilation failed. This is useful for programmatic error handling and feedback. ```JavaScript const status = compiler.status() ``` -------------------------------- ### ElmContext File Loading Capability Failure (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet illustrates the expected rejection format for the promise returned by the file loading `capability` when an error occurs. It provides the `type` of error (file) and the `path` to the file that failed to load. ```JavaScript { type: "file", path: "the absolute path to the file" } ``` -------------------------------- ### Publishing Elm Package to Elm Registry Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command publishes the Elm package to the official Elm package registry, making it available for public use. ```Shell npx elm publish ``` -------------------------------- ### Pushing Git Tags to Remote Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This Git command pushes all local tags to the remote repository, making the new release tags available to others. ```Shell git push --tags ``` -------------------------------- ### Evaluating Elm Code with ElmContext (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet demonstrates how to use the `elmContext#evaluate()` method. It takes a callback function that receives the compiled `Elm` JavaScript object as an argument. This allows the runner application to interact directly with the Elm application's exposed ports or functions after it has been loaded into the DOM. ```JavaScript elmContext.evaluate((Elm) => { // do something with the Elm JavaScript object }) ``` -------------------------------- ### Defining the Reporter Interface in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet defines the structure of a Reporter object, which is an interface for handling various events during an elm-spec suite run. It includes methods for starting/finishing a suite, recording observations, and logging errors or reports, allowing for custom reporting mechanisms. ```JavaScript { // Called at the start of a suite run. // Note: this will be called once for each parallel segment. startSuite: () => {}, // Called with an Observation after each expectation is evaluated. record: (observation) => {}, // Called with a Report. If there is an error, the spec suite segment will immediately end. error: (err) => {}, // Called with a Report. log: (report) => {}, // Called at the end of the spec suite run. // Note: this will be called once for each parallel segment. finish: () => {} } ``` -------------------------------- ### elm-spec-harness Compiler Status Constants in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-harness/README.md This snippet defines the possible constant values returned by the `compiler.status()` method. These constants (`READY`, `NO_FILES`, `COMPILATION_SUCCEEDED`, `COMPILATION_FAILED`) provide clear indicators of the compilation process's state, allowing developers to implement logic based on the outcome of the Elm code compilation. ```JavaScript // no compilation has occurred Compiler.STATUS.READY // no files found to compile Compiler.STATUS.NO_FILES // files were found and successfully compiled Compiler.STATUS.COMPILATION_SUCCEEDED // files were found but compilation failed Compiler.STATUS.COMPILATION_FAILED ``` -------------------------------- ### Elm-Spec Compiler Status Constants (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet lists the possible status values returned by the `compiler#status()` method. These constants indicate the current state of the compilation process, such as `READY` (no compilation yet), `NO_FILES` (no spec files found), `COMPILATION_SUCCEEDED` (successful compilation), or `COMPILATION_FAILED` (compilation errors). ```JavaScript // no compilation has occurred Compiler.STATUS.READY // no files found to compile Compiler.STATUS.NO_FILES // files were found and successfully compiled Compiler.STATUS.COMPILATION_SUCCEEDED // files were found but compilation failed Compiler.STATUS.COMPILATION_FAILED ``` -------------------------------- ### Checking Elm Spec Ports with ProgramRunner Static Method in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md The `ProgramRunner.hasElmSpecPorts(app)` static method is used to verify if a given Elm application instance (`app`) possesses the necessary ports for elm-spec integration. It returns a boolean indicating whether the expected ports are present, which is crucial for ensuring proper communication. ```JavaScript ProgramRunner.hasElmSpecPorts(app) ``` -------------------------------- ### Updating Dependencies in elm-spec (Lerna Monorepo) Source: https://github.com/brian-watkins/elm-spec/blob/master/README_DEV.md This command initiates the process for updating project dependencies across the monorepo, likely leveraging Lerna's internal dependency management capabilities. ```Shell $ npx lernaupdate ``` -------------------------------- ### Defining the Observation Object Structure in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet illustrates the structure of an Observation object, which encapsulates the results of an evaluated expectation. It includes details such as the description, scenario conditions, summary (ACCEPTED, SKIPPED, REJECTED), an optional report for rejections, and the module path where the observation originated. ```JavaScript { // what is being described by the spec description: 'Some description', // steps in the scenario script conditions: [ 'Scenario: Some scenario', 'When something happens', 'it does something' ], // The outcome of the observation: ACCEPTED, SKIPPED, or REJECTED summary: 'ACCEPTED', // If the expectation is rejected, a report that explains why report: null, // Absolute path to the file containing the elm-spec program that produced this observation. modulePath: "/some/path/to/some/elm/SomeSpec.elm" } ``` -------------------------------- ### SuiteRunner Completion Event (Error) (JavaScript) Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet illustrates the object emitted by the `complete` event when `runAll` or `runSegment` encounters an error during scenario execution. The `status` property is set to `"Error"`, indicating that the test suite could not complete successfully. ```JavaScript { status: "Error" } ``` -------------------------------- ### Defining a Custom Equality Helper in Elm-Spec Source: https://github.com/brian-watkins/elm-spec/blob/master/README.md This Elm snippet defines a utility function `equals` within a `Spec.Extra` module, designed to simplify equality assertions in elm-spec test suites. It leverages `Claim.isEqual Debug.toString` to provide a concise way to compare values, reducing boilerplate and enhancing readability for common test cases. This function can be imported and reused across various spec files. ```Elm module Spec.Extra exposing (equals) import Spec.Claim as Claim exposing (Claim) equals : a -> Claim a equals = Claim.isEqual Debug.toString ``` -------------------------------- ### Defining the Report Object Structure in JavaScript Source: https://github.com/brian-watkins/elm-spec/blob/master/runner/elm-spec-core/README.md This snippet shows the structure of a Report object, which is an array of objects, each containing a 'statement' and 'detail'. Reports are used to provide explanations, especially when an expectation is rejected or an error occurs, offering granular feedback on test failures. ```JavaScript [ { statement: "Expected", detail: "True" }, { statement: "to be", detail: "False" } ] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.