repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/web.d.ts | packages/hoppscotch-js-sandbox/web.d.ts | export { default } from "./dist/web/index.d.ts"
export * from "./dist/web/index.d.ts"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/setupFiles.ts | packages/hoppscotch-js-sandbox/setupFiles.ts | // Vitest doesn't work without globals
// Ref: https://github.com/relmify/jest-fp-ts/issues/11
import decodeMatchers from "@relmify/jest-fp-ts/dist/decodeMatchers"
import eitherMatchers from "@relmify/jest-fp-ts/dist/eitherMatchers"
import optionMatchers from "@relmify/jest-fp-ts/dist/optionMatchers"
import theseMatch... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/index.d.ts | packages/hoppscotch-js-sandbox/index.d.ts | export { default } from "./dist/types/index.d.ts"
export * from "./dist/types/index.d.ts"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/node.d.ts | packages/hoppscotch-js-sandbox/node.d.ts | export { default } from "./dist/node/index.d.ts"
export * from "./dist/node/index.d.ts"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/vite.config.ts | packages/hoppscotch-js-sandbox/vite.config.ts | import { resolve } from "path"
import { defineConfig } from "vite"
export default defineConfig({
build: {
outDir: "./dist",
emptyOutDir: true,
lib: {
entry: {
web: "./src/web/index.ts",
node: "./src/node/index.ts",
},
name: "js-sandbox",
formats: ["es", "cjs"],
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/global.d.ts | packages/hoppscotch-js-sandbox/src/global.d.ts | import "@relmify/jest-fp-ts"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/utils.ts | packages/hoppscotch-js-sandbox/src/node/utils.ts | import { createRequire } from "module"
const nodeRequire = createRequire(import.meta.url)
const ivm = nodeRequire("isolated-vm")
// Helper function to recursively wrap methods in `ivm.Reference`
export const getSerializedAPIMethods = (
namespaceObj: Record<string, unknown>
): Record<string, unknown> => {
const re... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/index.ts | packages/hoppscotch-js-sandbox/src/node/index.ts | export { runPreRequestScript } from "./pre-request"
export { runTestScript } from "./test-runner"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/pre-request/experimental.ts | packages/hoppscotch-js-sandbox/src/node/pre-request/experimental.ts | import { Cookie, HoppRESTRequest } from "@hoppscotch/data"
import { FaradayCage } from "faraday-cage"
import { pipe } from "fp-ts/function"
import * as TE from "fp-ts/lib/TaskEither"
import { cloneDeep } from "lodash"
import { defaultModules, preRequestModule } from "~/cage-modules"
import { HoppFetchHook, SandboxPreR... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/pre-request/legacy.ts | packages/hoppscotch-js-sandbox/src/node/pre-request/legacy.ts | import { pipe } from "fp-ts/function"
import * as TE from "fp-ts/lib/TaskEither"
import type ivmT from "isolated-vm"
import { createRequire } from "module"
import { getPreRequestScriptMethods } from "~/utils/shared"
import { SandboxPreRequestResult, TestResult } from "~/types"
import { getSerializedAPIMethods } from "... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/pre-request/index.ts | packages/hoppscotch-js-sandbox/src/node/pre-request/index.ts | import * as TE from "fp-ts/lib/TaskEither"
import { pipe } from "fp-ts/function"
import { RunPreRequestScriptOptions, SandboxPreRequestResult } from "~/types"
import { runPreRequestScriptWithFaradayCage } from "./experimental"
export const runPreRequestScript = (
preRequestScript: string,
options: RunPreRequestSc... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/test-runner/experimental.ts | packages/hoppscotch-js-sandbox/src/node/test-runner/experimental.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { FaradayCage } from "faraday-cage"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { cloneDeep } from "lodash"
import { defaultModules, postRequestModule } from "~/cage-modules"
import {
HoppFetchHook,
TestDescriptor,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/test-runner/legacy.ts | packages/hoppscotch-js-sandbox/src/node/test-runner/legacy.ts | import * as E from "fp-ts/Either"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import type ivmT from "isolated-vm"
import { createRequire } from "module"
import { TestResponse, TestResult } from "~/types"
import {
getTestRunnerScriptMethods,
preventCyclicObjects,
} from "~/utils/sha... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/node/test-runner/index.ts | packages/hoppscotch-js-sandbox/src/node/test-runner/index.ts | import * as E from "fp-ts/Either"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { RunPostRequestScriptOptions, TestResponse, TestResult } from "~/types"
import { preventCyclicObjects } from "~/utils/shared"
import { runPostRequestScriptWithFaradayCage } from "./experimental"
// F... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/utils/chai-integration.ts | packages/hoppscotch-js-sandbox/src/utils/chai-integration.ts | import * as chai from "chai"
import { TestDescriptor, SandboxValue } from "../types"
/**
* Creates a Chai expectation that records results to the test stack
* This integrates actual Chai.js with Hoppscotch's test reporting system
*
* Returns a serializable proxy object that can cross the sandbox boundary
*/
expor... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/utils/test-helpers.ts | packages/hoppscotch-js-sandbox/src/utils/test-helpers.ts | /**
* Consolidated test helpers for all namespace tests
*
* This file provides reusable helper functions to eliminate duplication
* across 45+ test files that previously had inline `func` definitions.
*/
import { getDefaultRESTRequest } from "@hoppscotch/data"
import * as TE from "fp-ts/TaskEither"
import { pipe ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/utils/pre-request.ts | packages/hoppscotch-js-sandbox/src/utils/pre-request.ts | import {
HoppRESTAuth,
HoppRESTHeaders,
HoppRESTParams,
HoppRESTReqBody,
HoppRESTRequest,
} from "@hoppscotch/data"
import { cloneDeep } from "lodash"
export const getRequestSetterMethods = (request: HoppRESTRequest) => {
// Clone to allow safe mutations internally
const updatedRequest = <HoppRESTRequest... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/utils/shared.ts | packages/hoppscotch-js-sandbox/src/utils/shared.ts | import {
Cookie,
CookieSchema,
HoppRESTRequest,
parseTemplateStringE,
} from "@hoppscotch/data"
import * as E from "fp-ts/Either"
import * as O from "fp-ts/Option"
import { pipe } from "fp-ts/lib/function"
import { cloneDeep } from "lodash-es"
import {
Expectation,
TestDescriptor,
TestResult,
SandboxVa... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/cookies.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/cookies.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { Cookie, TestResponse } from "~/types"
import { runPreRequestScript, runTestScript } from "~/web"
const baseCookies: Cookie[] = [
{
name: "session_id",
value: "abc123",
domain: "example.com",... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/request.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/request.spec.ts | import {
HoppRESTAuth,
HoppRESTReqBody,
HoppRESTRequest,
} from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript, runTestScript } from "~/web"
import { TestResponse } from "~/types"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoin... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/fetch.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/fetch.spec.ts | import { describe, expect, test, vi } from "vitest"
import { runTest } from "~/utils/test-helpers"
import type { HoppFetchHook } from "~/types"
/**
* Comprehensive tests for hopp.fetch() and global fetch() API
*
* This test suite covers the complete Fetch API implementation including:
* - Basic fetch functionality... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/response.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/response.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runTestScript } from "~/web"
import { TestResponse } from "~/types"
const defaultRequest = getDefaultRESTRequest()
const sampleHeaders = [
{ key: "content-type", value: "application/json" },
{ key: "x... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/setInitial.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/setInitial.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("hopp.env.setInitial", () => {
test("sets initial value in selected env when key doesn't exist", () => {
return expect(
runTest(
`
hopp.env.setInitial("newKey", "newValue")
co... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/getInitialRaw.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/getInitialRaw.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("hopp.env.getInitialRaw", () => {
test("returns initial value for existing selected env variable", () => {
return expect(
runTest(
`
const val = hopp.env.getInitialRaw("foo")
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/get.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/get.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("hopp.env.get", () => {
test("returns the correct value for an existing selected environment value", () => {
return expect(
runTest(
`
const data = hopp.env.get("a")
hopp.expe... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/delete.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/delete.spec.ts | import { describe, expect, test } from "vitest"
import { runTestAndGetEnvs, runTest } from "~/utils/test-helpers"
describe("hopp.env.delete", () => {
test("removes variable from selected environment", () =>
expect(
runTestAndGetEnvs(`hopp.env.delete("baseUrl")`, {
global: [],
selected: [
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/reset.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/reset.spec.ts | import { describe, expect, test } from "vitest"
import { runTestAndGetEnvs, runTest } from "~/utils/test-helpers"
describe("hopp.env.reset", () => {
test("resets selected variable to its initial value", () =>
expect(
runTestAndGetEnvs(
`
hopp.env.set("foo", "changed")
hopp.env.r... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/undefined-rejection.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/undefined-rejection.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { describe, expect, test } from "vitest"
import { runTestScript } from "~/node"
import { TestResponse, TestResult } from "~/types"
// Hopp namespace enforces strict string typin... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/set.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/set.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { describe, expect, test } from "vitest"
import { runTestScript } from "~/node"
import { TestResponse, TestResult } from "~/types"
const defaultRequest = getDefaultRESTRequest()... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/getRaw.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/env/getRaw.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("hopp.env.getRaw", () => {
test("returns the correct value for an existing selected environment value", () => {
return expect(
runTest(
`
const data = hopp.env.getRaw("a")
hop... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/core-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/core-assertions.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/discussions/5221
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("`hopp.expect` - Core Chai Assertions", () => {
describe("Language Chains", () => {
test("should support all language chain properties... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/strings-regex.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/strings-regex.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("hopp.expect - String and Regex Methods", () => {
describe("String Inclusion (.string())", () => {
test("should support .string() for substring inclusion", () => {
return expect(
runTest(`
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/exotic-objects.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/exotic-objects.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
// Behavior validation for exotic objects (Proxy, etc.) within sandbox serialization constraints
describe("hopp.expect - Exotic Objects & Error Edge Cases", () => {
describe("Proxy Objects", () => {
test("should handle... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/functions-errors.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/functions-errors.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/discussions/5221
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("`hopp.expect` - Functions and Error Assertions", () => {
describe("Throw Assertions", () => {
test("should support `.throw()` without... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/properties-collections.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/hopp-namespace/chai-powered-assertions/properties-collections.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/discussions/5221
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("`hopp.expect` - Properties and Collections Assertions", () => {
describe("Property Assertions", () => {
test("should assert basic pro... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/utils/pre-request.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/utils/pre-request.spec.ts | import {
HoppRESTAuth,
HoppRESTReqBody,
HoppRESTRequest,
} from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { getRequestSetterMethods } from "~/utils/pre-request"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://example.com/api",
meth... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/utils/shared.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/utils/shared.spec.ts | import {
getSharedCookieMethods,
getSharedEnvMethods,
getSharedRequestProps,
preventCyclicObjects,
} from "~/utils/shared"
import { Cookie, HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { TestResult } from "~/types"
describe("preventCyclicObjects", () => {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/cage-modules/fetch.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/cage-modules/fetch.spec.ts | import { describe, test, it, expect } from "vitest"
import { FaradayCage } from "faraday-cage"
import { defaultModules } from "~/cage-modules"
import type { HoppFetchHook } from "~/types"
const jsonBody = { foo: "bar", answer: 42 }
const jsonText = JSON.stringify(jsonBody)
const jsonBytes = Array.from(new TextEncoder(... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/base64-helper-functions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/base64-helper-functions.spec.ts | import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { describe, expect, test } from "vitest"
import { getDefaultRESTRequest } from "@hoppscotch/data"
import { runPreRequestScript, runTestScript } from "~/node"
import { TestResponse, TestResult } from "~/types"
const defaultRequest = g... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/pre-request.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/pre-request.spec.ts | import { describe, expect, test } from "vitest"
import { getDefaultRESTRequest } from "@hoppscotch/data"
import { runPreRequestScript } from "~/node"
const DEFAULT_REQUEST = getDefaultRESTRequest()
describe("runPreRequestScript", () => {
test("returns the updated environment properly", () => {
return expect(
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBe.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBe.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
describe("toBe", () => {
describe("general assertion (no negation)", () => {
test("expect equals expected passes assertion", () => {
return expect(
runTest(
`
pw.expect... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toInclude.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toInclude.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
describe("toInclude", () => {
test("asserts true for collections with matching values", () => {
return expect(
runTest(
`
pw.expect([1, 2, 3]).toInclude(1)
pw.expect("123... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toHaveLength.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toHaveLength.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
describe("toHaveLength", () => {
test("asserts true for valid lengths with no negation", () => {
return expect(
runTest(
`
pw.expect([1, 2, 3, 4]).toHaveLength(4)
pw.expe... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBeType.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBeType.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
describe("toBeType", () => {
test("asserts true for valid type expectations with no negation", () => {
return expect(
runTest(
`
pw.expect(2).toBeType("number")
pw.expect... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBeLevelxxx.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/expect/toBeLevelxxx.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
// Skipped: These tests are comprehensive but cause timeout issues in CI/CD environments
// due to the large number of iterations (100+ per test). The toBeLevelxxx matchers are
// adequately covered by other te... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/resolve.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/resolve.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pw.env.resolve", () => {
test("value should be a string", () => {
return expect(
runTest(
`
pw.env.resolve(5)
`,
{
global: [],
selected: [],
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/get.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/get.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pw.env.get", () => {
test("returns the correct value for an existing selected environment value", () => {
return expect(
runTest(
`
const data = pw.env.get("a")
pw.expect(dat... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/getResolve.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/getResolve.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pw.env.getResolve", () => {
test("returns the correct value for an existing selected environment value", () => {
return expect(
runTest(
`
const data = pw.env.getResolve("a")
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/set.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/set.spec.ts | import { describe, expect, test } from "vitest"
import { runTestAndGetEnvs, runTest } from "~/utils/test-helpers"
describe("pw.env.set", () => {
test("updates the selected environment variable correctly", () => {
return expect(
runTestAndGetEnvs(
`
pw.env.set("a", "c")
`,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/unset.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pw-namespace/env/unset.spec.ts | import { describe, expect, test } from "vitest"
import { runTestAndGetEnvs, runTest } from "~/utils/test-helpers"
describe("pw.env.unset", () => {
test("removes the variable set in selected environment correctly", () => {
return expect(
runTestAndGetEnvs(
`
pw.env.unset("baseUrl")
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/side-effects-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/side-effects-assertions.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/discussions/5221
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)(
"%s.expect() - Side Effect Assertions (Standard Pattern)",
(namespace) => ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/deep-include-keys-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/deep-include-keys-assertions.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)(
"%s.expect() - deep.include() - Object Property Inclusion",
(namespace) => {
test("should pass when object deeply includes partial match", async ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/null-undefined-value-preservation.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/null-undefined-value-preservation.spec.ts | /**
* Null and Undefined Value Preservation Across Namespaces
*
* Tests that null and undefined values are correctly preserved when setting
* and getting environment variables across pm, pw, and hopp namespaces.
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
des... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/instanceof-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/instanceof-assertions.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)(
"%s.expect() - instanceof assertions - Built-in types",
(namespace) => {
test("should support instanceof Object for plain objects", async () => {... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/test-context-preservation.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/test-context-preservation.spec.ts | /**
* Regression Test: Test Context Preservation
*
* This test ensures that ALL expectation methods properly preserve the test context
* and record assertions inside the correct test block, not at root level.
*
* Bug History:
* - toBeType() and expectNotToBeType() were incorrectly using createExpectation() direc... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/core-chai-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/core-chai-assertions.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/discussions/5221
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)("%s.expect() - Core Chai Assertions", (namespace) => {
describe("Equality Ass... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/async-await-support.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/async-await-support.spec.ts | /**
* Async/Await Support Tests
*
* Tests that pm.test() and hopp.test() properly support async functions with await,
* which is critical for Postman script imports that use asynchronous patterns.
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES =... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/length-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/length-assertions.spec.ts | import { describe, expect, test } from "vitest"
import { TestResponse } from "~/types"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)("%s.expect() - Length Assertions", (namespace) => {
const mockResponse: TestResponse = {
status: 200,
sta... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/keys-members-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/keys-members-assertions.spec.ts | /**
* @see https://github.com/hoppscotch/hoppscotch/issues/5489
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
const NAMESPACES = ["pm", "hopp"] as const
describe.each(NAMESPACES)("%s.expect() - Keys Assertions", (namespace) => {
describe("keys() method", () => ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/env-fallback-behavior.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/env-fallback-behavior.spec.ts | /**
* Environment Variable Fallback Behavior Tests
*
* Tests the fallback from currentValue to initialValue when currentValue is empty
* across pm.environment and hopp.env namespaces.
*/
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
// All namespaces share the sam... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/combined/test-runner.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/combined/test-runner.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, fakeResponse } from "~/utils/test-helpers"
/**
* Test runner behavior across all namespaces (pw, hopp, pm)
*
* This test suite validates:
* 1. Syntax error handling - all namespaces throw on invalid syntax
* 2. Async/await support - test functions ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/expect-fail.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/expect-fail.spec.ts | import { describe, expect, test } from "vitest"
import { TestResponse } from "~/types"
import { runTest } from "~/utils/test-helpers"
const mockResponse: TestResponse = {
status: 200,
statusText: "OK",
responseTime: 0,
body: "OK",
headers: [],
}
describe("pm.expect.fail() - Explicit test failures", () => {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/variables.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/variables.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/node"
import { runTest } from "~/utils/test-helpers"
describe("pm.environment", () => {
test("pm.environment.get returns the correct value for an existing active environment... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/chai-modifier-combinations.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/chai-modifier-combinations.spec.ts | import { describe, expect, test } from "vitest"
import { TestResponse } from "~/types"
import { runTest } from "~/utils/test-helpers"
const mockResponse: TestResponse = {
status: 200,
statusText: "OK",
responseTime: 0,
body: "OK",
headers: [],
}
describe("Chai Edge Cases - .include.members() / .contain.memb... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/type-coercion.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/type-coercion.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
// Postman compatibility: all types preserved during runtime, only undefined needs special handling
describe("PM namespace type preservation (Postman compatibility)", () => {
describe("Array preservation", () => {
tes... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/advanced-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/advanced-assertions.spec.ts | import { describe, expect, test } from "vitest"
import { TestResponse } from "~/types"
import { runTest } from "~/utils/test-helpers"
describe("`pm.response.to.have.jsonSchema` - JSON Schema Validation", () => {
test("should validate simple type schema", () => {
const response: TestResponse = {
status: 200... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/pre-request-type-preservation.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/pre-request-type-preservation.spec.ts | import { describe, expect, test } from "vitest"
import { getDefaultRESTRequest } from "@hoppscotch/data"
import { runPreRequestScript } from "~/node"
const DEFAULT_REQUEST = getDefaultRESTRequest()
// Pre-request scripts use markers to preserve null/undefined across serialization
describe("PM namespace type preserva... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/map-set-size.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/map-set-size.spec.ts | // Map/Set serialize as {} across sandbox boundary, so we extract .size before serialization
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("Map.size property assertions", () => {
test("should support .property('size') for Map", async () => {
const testSc... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/execution.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/execution.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, runPreRequest } from "~/utils/test-helpers"
describe("pm.execution namespace", () => {
test("pm.execution.location returns Hoppscotch array in test script", () => {
return expect(
runTest(
`
pm.test("pm.execution.location i... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/sendRequest.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/sendRequest.spec.ts | import { describe, expect, test, vi } from "vitest"
import { runTest } from "~/utils/test-helpers"
import type { HoppFetchHook } from "~/types"
/**
* Tests for pm.sendRequest() functionality
*
* NOTE: These unit tests validate API availability but have limited coverage
* due to QuickJS async callback timing issues... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/property-chaining.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/property-chaining.spec.ts | // .property('key') returns a NEW expectation wrapping the property value
import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("property() with .that chaining", () => {
test("should chain property value with .that.equals()", async () => {
const testScript = `
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/unsupported.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/unsupported.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, runPreRequest } from "~/utils/test-helpers"
// Unified test data for unsupported APIs
const unsupportedApis = [
{
api: "pm.info.iteration",
script: "const iteration = pm.info.iteration",
errorMessage:
"pm.info.iteration is not suppor... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/serialization-edge-cases.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/serialization-edge-cases.spec.ts | // QuickJS sandbox boundary serialization: compute values BEFORE crossing to preserve type info
import { describe, expect, test } from "vitest"
import {
runTestWithResponse,
fakeResponse,
runTest,
} from "~/utils/test-helpers"
describe("Serialization Edge Cases - Object Reference Equality", () => {
describe("... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/info.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/info.spec.ts | import { getDefaultRESTRequest } from "@hoppscotch/data"
import * as TE from "fp-ts/TaskEither"
import { pipe } from "fp-ts/function"
import { describe, expect, test } from "vitest"
import { runTestScript } from "~/node"
import { runTest, defaultRequest, fakeResponse } from "~/utils/test-helpers"
import { runPreRequest... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/chai-advanced-features.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/chai-advanced-features.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pm.expect - Advanced Chai Features", () => {
describe(".nested property assertions", () => {
test("should access nested properties using dot notation", () => {
return expect(
runTest(
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/environment.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/environment.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pm.environment additional coverage", () => {
test("pm.environment.set creates and retrieves environment variable", () => {
return expect(
runTest(
`
pm.environment.set("test_set", "set... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/cross-namespace-undefined.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/cross-namespace-undefined.spec.ts | import { describe, expect, test } from "vitest"
import { runTest, runTestAndGetEnvs } from "~/utils/test-helpers"
import { runPreRequestScript } from "~/node"
import { getDefaultRESTRequest } from "@hoppscotch/data"
const DEFAULT_REQUEST = getDefaultRESTRequest()
// Undefined marker pattern ensures values survive ser... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/cookies.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/cookies.spec.ts | /**
* @file Tests for Postman cookie handling (pm.response.cookies.*, pm.response.to.have.cookie)
*
* These tests verify cookie parsing from Set-Cookie headers and cookie assertions.
* Cookies in responses are extracted from Set-Cookie headers and made available
* through the pm.response.cookies API.
*/
import {... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/bdd-assertions.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/bdd-assertions.spec.ts | /**
* @file Tests for Postman BDD-style response assertions (pm.response.to.*)
*
* These tests verify the Postman compatibility layer's BDD-style assertion helpers
* which are commonly used in Postman collections. They provide syntactic sugar over
* the standard Chai assertions for common response validation patte... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/method-existence.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/method-existence.spec.ts | import { describe, expect, it } from "vitest"
import { runTestScript } from "~/node"
import { TestResponse } from "~/types/test-runner"
describe("pm.response method existence checks", () => {
const mockResponse: TestResponse = {
status: 200,
headers: [{ key: "Content-Type", value: "application/json" }],
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/datauri-comprehensive.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/datauri-comprehensive.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pm.response.dataURI() comprehensive coverage", () => {
test("should handle Content-Type without charset", async () => {
const response: TestResponse = {
status: 200,
statusText: "OK",
body: ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/basic.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/response/basic.spec.ts | import { describe, expect, test } from "vitest"
import { TestResponse, TestResult } from "~/types"
import { runTest } from "~/utils/test-helpers"
const customResponse: TestResponse = {
status: 200,
statusText: "OK",
body: JSON.stringify({ message: "Hello, World!" }),
headers: [
{ key: "Content-Type", value... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/mutations.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/mutations.spec.ts | import { HoppRESTAuth, HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://example.com/api/users?filter=active&sort=name",
method: "GET",
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/basic.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/basic.spec.ts | import { describe, expect, test } from "vitest"
import { runTest } from "~/utils/test-helpers"
describe("pm.request coverage", () => {
test("pm.request object provides access to request data", () => {
return expect(
runTest(
`
pw.expect(pm.request.url.toString()).toBe("https://echo.hoppsc... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/query/propertylist.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/query/propertylist.spec.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://api.example.com/users?filter=active&sort=name&page=1",
method: "GET",
header... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/url/helper-methods.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/url/helper-methods.spec.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint:
"https://api.example.com:8080/v1/users/profile?filter=active&sort=name",
method: "G... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/url/properties.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/url/properties.spec.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://api.example.com/users#section1",
method: "GET",
headers: [],
params: [],
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/headers/propertylist-advanced.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/headers/propertylist-advanced.spec.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://api.example.com/users",
method: "POST",
headers: [
{ key: "Content-Type"... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/headers/propertylist.spec.ts | packages/hoppscotch-js-sandbox/src/__tests__/pm-namespace/request/headers/propertylist.spec.ts | import { HoppRESTRequest, getDefaultRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { runPreRequestScript } from "~/web"
const baseRequest: HoppRESTRequest = {
v: "16",
name: "Test Request",
endpoint: "https://api.example.com/users",
method: "GET",
headers: [
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/types/index.ts | packages/hoppscotch-js-sandbox/src/types/index.ts | import { Cookie, HoppRESTRequest } from "@hoppscotch/data"
import { ConsoleEntry, defineSandboxFn } from "faraday-cage/modules"
import type { EnvAPIOptions } from "~/utils/shared"
// Infer the return type of defineSandboxFn from faraday-cage
type SandboxFunction = ReturnType<typeof defineSandboxFn>
/**
* Type alias... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts | packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts | import { Cookie, HoppRESTRequest } from "@hoppscotch/data"
import {
CageModuleCtx,
defineCageModule,
defineSandboxFn,
defineSandboxObject,
} from "faraday-cage/modules"
import { cloneDeep } from "lodash-es"
import { getStatusReason } from "~/constants/http-status-codes"
import { BaseInputs, TestDescriptor, Tes... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/fetch.ts | packages/hoppscotch-js-sandbox/src/cage-modules/fetch.ts | import {
defineCageModule,
defineSandboxFunctionRaw,
} from "faraday-cage/modules"
import type { HoppFetchHook } from "~/types"
/**
* Type augmentation for Headers to include iterator methods
* These methods exist in modern Headers implementations but may not be in all type definitions
*/
interface HeadersWithI... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/default.ts | packages/hoppscotch-js-sandbox/src/cage-modules/default.ts | import {
blobPolyfill,
ConsoleEntry,
console as ConsoleModule,
crypto,
encoding,
esmModuleLoader,
timers,
urlPolyfill,
} from "faraday-cage/modules"
import type { HoppFetchHook } from "~/types"
import { customFetchModule } from "./fetch"
type DefaultModulesConfig = {
handleConsoleEntry?: (consoleEntr... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/index.ts | packages/hoppscotch-js-sandbox/src/cage-modules/index.ts | export { defaultModules } from "./default"
export { postRequestModule, preRequestModule } from "./scripting-modules"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/utils/base-inputs.ts | packages/hoppscotch-js-sandbox/src/cage-modules/utils/base-inputs.ts | import { Cookie, HoppRESTRequest } from "@hoppscotch/data"
import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import { TestResult, BaseInputs, SandboxValue } from "~/types"
import {
getSharedCookieMethods,
getSharedEnvMethods,
getSharedRequestProps,
} from "~/utils/shared"
import { UNDEFINED_M... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/utils/expectation-helpers.ts | packages/hoppscotch-js-sandbox/src/cage-modules/utils/expectation-helpers.ts | import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import { TestDescriptor, ExpectationMethods, SandboxValue } from "~/types"
import { createExpectation } from "~/utils/shared"
/**
* Creates expectation methods for test assertions in post-request scripts
*/
export const createExpectationMethods =... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/utils/chai-helpers.ts | packages/hoppscotch-js-sandbox/src/cage-modules/utils/chai-helpers.ts | import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import * as chai from "chai"
import { TestDescriptor, SandboxValue } from "~/types"
/**
* Creates Chai-based assertion methods that can be used across the sandbox boundary
* Each method wraps actual Chai.js assertions and records results to the te... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/utils/request-setters.ts | packages/hoppscotch-js-sandbox/src/cage-modules/utils/request-setters.ts | import {
HoppRESTAuth,
HoppRESTHeaders,
HoppRESTParams,
HoppRESTReqBody,
HoppRESTRequest,
} from "@hoppscotch/data"
import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import { getRequestSetterMethods } from "~/utils/pre-request"
import { RequestSetterMethodsResult } from "~/types"
/**
* ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/namespaces/pw-namespace.ts | packages/hoppscotch-js-sandbox/src/cage-modules/namespaces/pw-namespace.ts | import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import type {
EnvMethods,
RequestProps,
PwNamespaceMethods,
SandboxValue,
} from "~/types"
/**
* Creates pw namespace methods for the sandbox environment
* Includes environment operations and request variable management
*/
export const c... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-js-sandbox/src/cage-modules/namespaces/pm-namespace.ts | packages/hoppscotch-js-sandbox/src/cage-modules/namespaces/pm-namespace.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { CageModuleCtx, defineSandboxFn } from "faraday-cage/modules"
import type { PmNamespaceMethods } from "~/types"
/**
* Creates pm (Postman compatibility) namespace methods for the sandbox environment
* Provides Postman-compatible APIs for request information... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.