CodeSampleX

Что нашла сеть

Каждая строка ниже — измерение, а не мнение. Каждая ведёт к опубликованному образцу, contract которого выполняется в закреплённом контейнере с отключённой сетью, так что его можно перезапустить и оспорить результат.

Система и среда взяты из записи связанного образца; записи без выбранного измерения исключаются.

597 находок в 8 экосистемах.

Что заявляет образец и что измеряет его контракт

226–250 из 568, измеренных опубликованными образцами.

  1. golangКонтракт образцаgo · linux/x64gorm.io/gorm@v1.31.2

    СчитаетсяA conditional Preload filters root parent records and Joins can load a HasMany slice association in GORM 1.31.2.

    Измереноassert Preload with a condition returns both parent records and leaves the nonmatching parent's child slice empty

  2. pypiКонтракт образцаpython · linux/x64joblib@1.5.3

    СчитаетсяPassing mmap_mode='r' to joblib.load guarantees a numpy.memmap for compatible arrays, regardless of how the file was serialized.

    Измереноjoblib 1.5.3 loading a NumPy 2.5.2 array saved with compress=3 and mmap_mode='r' warns that memory mapping is incompatible with compression and returns an in-memory ndarray.

  3. pypiКонтракт образцаpython 3.12 · linux/x64requests@2.34.2

    СчитаетсяPreparing a Request directly and sending it through a Session automatically applies that Session's headers, cookies, and REQUESTS_CA_BUNDLE setting.

    Измереноassert Request.prepare omits Session default headers and cookies while Session.prepare_request applies both

  4. pubКонтракт образцаdart · linux/x64shelf@1.4.2

    СчитаетсяMounting with `'/api'` only handles `/api/...` and should not match a request to `/api` itself.

    ИзмереноA GET request to /api after app.mount('/api', subRouter.call) reaches the mounted sub-router root.

  5. pubКонтракт образцаdart · linux/x64equatable@2.1.0

    СчитаетсяTwo generic Equatable instances with identical values are equal when one type argument is a subtype of the other, such as Box<num>(42) and Box<int>(42).

    ИзмереноTwo generic Equatable instances with identical values are not equal when type arguments differ across subtype boundaries, and their runtimeType-dependent hashCodes differ.

  6. pubКонтракт образцаdart · linux/x64collection@1.19.1

    СчитаетсяHeapPriorityQueue's unorderedElements property yields elements in priority-sorted order and PriorityQueue implements Iterable.

    ИзмереноPriorityQueue does not implement Iterable, and HeapPriorityQueue.unorderedElements yields elements in internal binary heap storage order rather than priority-sorted order.

  7. pubКонтракт образцаdart · linux/x64args@2.7.0

    СчитаетсяArgParser.addMultiOption treats each command-line argument value as a single list entry without splitting on internal commas.

    ИзмереноaddMultiOption splits comma-separated values into multiple entries by default, requiring splitCommas: false to preserve a single argument such as '--define env=prod,region=us-east' as ['env=prod,region=us-east'].

  8. npmКонтракт образцаnode · linux/x64puppeteer@24.43.1

    СчитаетсяA developer might assume Puppeteer simply inherits the browsers-layer version value and prints the `@puppeteer/browsers` package version.

    ИзмереноRunning `node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js --version` reports the Puppeteer package version and does not report `@puppeteer/browsers` version.

  9. npmКонтракт образцаnode · linux/x64vitest@4.0.0

    СчитаетсяA mock created with vi.fn records zero-based invocation order values, so its first two calls are numbered 0 and 1.

    Измереноassert two calls to one vi.fn mock produce mock.invocationCallOrder equal to [1, 2]

  10. pubКонтракт образцаdart · linux/x64args@2.7.0

    СчитаетсяArgParser stops matching options at the first positional argument unless allowTrailingOptions is set to true.

    ИзмереноArgParser().parse(["data.bin", "--force"]) sets force to true and keeps only data.bin in rest because trailing options are enabled by default.

  11. npmКонтракт образцаnode · linux/x64@rollup/plugin-commonjs@28.0.7

    СчитаетсяA strict plugin pass can still eagerly hoist conditional `node:` builtin requires into initialization code.

    ИзмереноBundling `if (false) { require('node:sqlite'); }` with `@rollup/plugin-commonjs` and `strictRequires: true` does not include `node:sqlite` in the generated CommonJS bundle.

  12. npmКонтракт образцаnode · linux/x64puppeteer@24.4.0

    СчитаетсяPuppeteer's device and network presets are properties on the default export, device descriptors use mobile/touch keys, and network throughput values are kilobits per second.

    ИзмереноPuppeteer 24.4.0 exposes KnownDevices and PredefinedNetworkConditions as named exports, not properties on its default export.

  13. npmКонтракт образцаnode · linux/x64puppeteer@25.7.0

    СчитаетсяOn current Puppeteer, page.screenshot() returns a Node.js Buffer, so calling result.toString('base64') uses Buffer's encoding overload.

    ИзмереноTypeScript 5.9 accepts Puppeteer 25.7.0 page.screenshot() with default options as Uint8Array and rejects an encoding argument passed to Uint8Array.toString.

  14. golangКонтракт образцаgo · linux/x64github.com/spf13/viper@v1.21.0

    Считаетсяviper.GetStringSlice parses a comma-separated environment value into the same multi-element slice as viper.Unmarshal.

    Измереноassert Unmarshal returns two elements for that same comma-separated environment value

  15. npmКонтракт образцаnode · linux/x64bun@1.3.14

    СчитаетсяBun.deepEquals treats a plain object with matching numeric indices and length as structurally equal to a TypedArray containing the same elements.

    ИзмереноBun.deepEquals returns false when comparing a numeric-keyed plain object to a Uint8Array with matching elements and length, verifying internal typed-array slots rather than only enumerable index properties

  16. npmКонтракт образцаnode · linux/x64@babel/core@7.29.7

    СчитаетсяLoading @babel/core through createRequire from an ES module throws instead of returning the CommonJS API object.

    Измереноassert createRequire can load @babel/core 7.29.7 from the ES module contract

  17. golangКонтракт образцаgo · linux/x64sigs.k8s.io/yaml@v1.5.0

    СчитаетсяA scalar type mismatch reported by sigs.k8s.io/yaml.Unmarshal is opaque text that cannot be matched as json.UnmarshalTypeError with errors.As.

    Измереноassert unmarshaling a: not_a_number into an int field returns a non-nil error

  18. pypiКонтракт образцаpython 3.12 · linux/x64pydantic-settings@2.15.0

    СчитаетсяPydantic BaseSettings reads nested environment variables using '__' as a delimiter by default.

    Измереноassert a DATABASE__HOST environment variable is ignored for a nested model when env_nested_delimiter is not configured

  19. pypiКонтракт образцаpython · linux/x64jinja2@3.1.6

    СчитаетсяUnder StrictUndefined, undefined variables evaluate to falsy in boolean conditionals and fall back cleanly through the default filter on nested attributes.

    ИзмереноBoolean evaluation of an undefined variable in an if condition raises UndefinedError under StrictUndefined instead of evaluating as falsy

  20. npmКонтракт образцаnode · linux/x64jsdom@26.1.0

    СчитаетсяTwo setState calls using the current state value will both increment the counter, resulting in a final state of 2

    Измереноassert two sequential setCount(count + 1) calls in one React 18 concurrent-root update produce a final rendered state of 1

  21. pubКонтракт образцаdart · linux/x64crypto@3.0.6

    СчитаетсяInternal constructor invariants in package:crypto throw an ArgumentError or StateError on invalid configurations regardless of Dart runtime flags.

    ИзмереноInstantiating HashSink with signatureBytes less than 8 bypasses checks and produces a digest in default mode, but throws AssertionError only when Dart is run with the --enable-asserts flag.

  22. pubКонтракт образцаdart · linux/x64args@2.7.0

    СчитаетсяArgParser.parse() throws an exception immediately when a mandatory option is omitted from the provided arguments.

    ИзмереноArgParser.parse() completes successfully when a mandatory option is omitted, and the validation exception is only thrown later when the missing option is retrieved from the ArgResults object.

  23. npmКонтракт образцаnode · linux/x64react@19.2.8

    СчитаетсяRendering an element with an empty string attribute such as `<img src="">` keeps that attribute in `react-dom` server output.

    Измереноassert `renderToString` removes an empty `src` attribute from `<img>` output

  24. npmКонтракт образцаnode · linux/x64marked@18.0.9

    СчитаетсяAs long as a `walkTokens` hook is declared `async`, Marked will apply its token mutations to output even when `async` is not enabled.

    ИзмереноWith a `walkTokens` function that mutates heading depth after awaiting, Marked renders `<h1>Heading</h1>` with `async` false, and `<h6>Heading</h6>` only when `async: true` is set.

  25. npmКонтракт образцаnode · linux/x64luxon@3.7.2

    СчитаетсяA caller can create a local calendar date with `DateTime.local({ year, month, day })` because the signature appears to accept an object-based constructor form.

    ИзмереноWith `Settings.now` fixed, `DateTime.local({ year: 2024, month: 2, day: 14 })` returns a valid DateTime at the fixed current instant, showing that the object is treated as options and its unit fields are ignored.

Как проверить любую строку здесь

Откройте образец, прочитайте его contract, запустите. Contract — это собственный тест образца: он выполняется без сети в закреплённом контейнере, и подписанная квитанция этого запуска — то, что хранит сеть. Ничто здесь не опирается на наше прочтение библиотеки — только на то, что библиотека сделала.

Некоторых опубликованных образцов на этой странице нет. Их контракт прошёл, и образец жив — но ни одна строка этого контракта не читается как фраза. Утверждение вроде expect(x).toBe(1), поставленное рядом с убеждением, которое оно проверяет, ничего читателю не говорит. Лучше оставить их за бортом, чем печатать свидетельство, которое никто не прочтёт.