CodeSampleX

네트워크가 찾아낸 것

아래 각 줄은 의견이 아니라 측정입니다. 모두 공개된 샘플로 연결되며, 그 샘플의 contract는 네트워크를 끈 고정 컨테이너에서 실행되므로 직접 다시 돌려 보고 반박할 수 있습니다.

운영체제와 런타임은 연결된 샘플에 실제 기록된 환경을 기준으로 합니다. 해당 값이 없는 항목은 필터 선택 시 제외됩니다.

597개 발견, 8개 생태계.

샘플이 말하고, 계약이 측정한 것

발행된 샘플이 측정한 결과 중 401–425번째입니다(전체 568개).

  1. golang샘플 컨트랙트go · linux/x64github.com/go-chi/chi/v5@v5.3.1

    믿는 것applying path-modifying middleware like StripSlashes per-route with r.With() strips trailing slashes for that specific route and serves a 200 OK response

    측정한 것assert per-route With(StripSlashes) fails with 404 on trailing slash requests because tree matching precedes route middleware

  2. golang샘플 컨트랙트go · linux/x64github.com/go-chi/chi/v5@v5.2.5

    믿는 것If no routes are configured on `middleware.RouteHeaders`, the wrapped request flow is inert and should skip calling the downstream handler.

    측정한 것`middleware.RouteHeaders().Handler` with an empty router must call the wrapped handler exactly once.

  3. golang샘플 컨트랙트go 1.26 · linux/x64github.com/go-chi/chi/v5@v5.3.1

    믿는 것A request using an unregistered HTTP method is handled by NotFound in the same way as a request for an unknown path.

    측정한 것chi.Mux.Get routes GET /widgets to the registered handler with status 200, Content-Type application/json, and body {"widgets":[]} followed by a newline.

  4. gem샘플 컨트랙트ruby · linux/x64zeitwerk@2.8.3

    믿는 것Calling loader.reload reloads modified source files by default, and reloading can be enabled at any point in the loader lifecycle after setup.

    측정한 것Calling loader.reload raises Zeitwerk::ReloadingDisabledError by default because reloading is disabled out of the box in major version 2, requiring an explicit loader.enable_reloading call before setup.

  5. gem샘플 컨트랙트ruby · linux/x64zeitwerk@2.8.3

    믿는 것Calling loader.unload completely tears down a Zeitwerk loader and releases its root directories for re-use by new loaders or for garbage collection.

    측정한 것assert calling loader.unload clears constants and autoloads but retains the loader in Zeitwerk::Registry.loaders and Zeitwerk::Loader.all_dirs, blocking any new loader from managing that root directory with Zeitwerk::Error until loader.unregister is explicitly called

  6. gem샘플 컨트랙트ruby · linux/x64zeitwerk@2.8.3

    믿는 것Calling loader.reload on a configured Zeitwerk autoloader unloads and refreshes constants without requiring opt-in configuration before setup, or reloading can be enabled at runtime whenever code changes occur.

    측정한 것assert calling loader.reload on a default loader raises Zeitwerk::ReloadingDisabledError because reloading is disabled by default and loader.enable_reloading must be called before setup, whereas calling enable_reloading after setup raises Zeitwerk::Error

  7. gem샘플 컨트랙트ruby · linux/x64zeitwerk@2.8.3

    믿는 것A model might expect reloading to be a runtime setting, so enabling it after setup should allow reload to work and unloading should always clear loaded constants.

    측정한 것Calling reload before enable_reloading raises Zeitwerk::ReloadingDisabledError, even after setup succeeds and autoloads are installed

  8. gem샘플 컨트랙트ruby · linux/x64zeitwerk@2.8.3

    믿는 것loader.collapse strips all directory nesting within the target directory so nested files define top-level constants in the parent namespace

    측정한 것assert loader.collapse removes only the collapsed directory from constant paths so files in subdirectories define namespaced constants (e.g. concerns/oauth/token.rb defines Oauth::Token) rather than flattening the entire subtree into the parent namespace (Token)

  9. gem샘플 컨트랙트ruby · linux/x64sinatra@4.2.1

    믿는 것Returning a Ruby Hash from a Sinatra route block either serializes to JSON or raises a type error, and returning a two-element array of a status integer and a hash sets the response status and headers.

    측정한 것assert a bare Hash returned from a route is treated as an Enumerable body yielding key-value array pairs with text/html rather than serializing to JSON

  10. gem샘플 컨트랙트ruby · linux/x64sinatra@4.2.1

    믿는 것Raising a custom exception in a route is handled by its error block in development mode while unhandled exceptions return 500 in test mode, halt bodies are never replaced by status handlers, and returning a Symbol or Integer sets the body or status identically to the status helper.

    측정한 것assert in development mode default show_exceptions intercepts custom exceptions with an HTML backtrace rather than running the error handler

  11. gem샘플 컨트랙트ruby · linux/x64mustermann@4.0.0

    믿는 것A wildcard capture that has no characters before the next separator is absent, so a capture like `path` should be nil.

    측정한 것A trailing slash on a wildcard route match yields an empty string capture rather than an absent nil value.

  12. gem샘플 컨트랙트ruby · linux/x64json@2.9.1

    믿는 것A Hash with keys 1 and '1' should preserve both entries after a round-trip because the two keys are different in Ruby.

    측정한 것JSON.generate turns both the integer key 1 and string key '1' into a duplicate JSON member name '1', so it emits two members but the parser can no longer distinguish the originals.

  13. gem샘플 컨트랙트ruby · linux/x64faraday-net_http@3.4.4

    믿는 것A confident model expects multiple requests inside a Net::HTTP Faraday `in_parallel` block to be dispatched concurrently.

    측정한 것In `in_parallel`, the second request starts at or after the first request has finished, showing that this adapter does not actually execute requests in parallel.

  14. gem샘플 컨트랙트ruby · linux/x64faraday-net_http@3.4.4

    믿는 것Faraday's NetHttp adapter accurately extracts quoted MIME charset parameters to transcode response bodies, preserves nil for empty 204 bodies, and automatically stringifies non-string header values.

    측정한 것assert Faraday NetHttp adapter falls back to Encoding::ASCII_8BIT when Content-Type contains a quoted charset parameter (such as charset=\"iso-8859-1\") rather than setting the parsed encoding

  15. gem샘플 컨트랙트ruby · linux/x64faraday-net_http@3.4.4

    믿는 것Setting `ssl.verify = false` for an HTTPS Faraday request is expected to also disable Net::HTTP hostname verification.

    측정한 것A `verify: false` TLS option only changes `verify_mode`; Faraday only sets `verify_hostname` when `verify_hostname` is explicitly passed in SSL options.

  16. composer샘플 컨트랙트php 8.5 · linux/x64symfony/http-foundation@8.1.4

    믿는 것Request::getPayload() follows Content-Type and merges all request inputs, while passing an already encoded JSON string to JsonResponse sends that document unchanged.

    측정한 것assert Request::getPayload prefers a non-empty parsed form bag over query and raw JSON, returns a defensive InputBag clone, and InputBag::get rejects nested values that InputBag::all retrieves

  17. composer샘플 컨트랙트php · linux/x64symfony/console@8.1.4

    믿는 것A model may expect an omitted `InputOption::VALUE_NEGATABLE` option to be returned as `false`.

    측정한 것When a command with `InputOption::VALUE_NEGATABLE` is executed without passing that option, `InputInterface::getOption` returns `null`.

  18. cargo샘플 컨트랙트rust · linux/x64sqlx@0.8.6

    믿는 것Declaring a struct field as Option<T> allows sqlx::FromRow to decode as None when the column is omitted from the SQL query projection.

    측정한 것Omitting an Option<T> column from a SELECT query causes FromRow to fail with ColumnNotFound instead of decoding as None

  19. cargo샘플 컨트랙트rust · linux/x64tracing@0.1.44

    믿는 것A subscriber installed with with_default is often assumed to compose with an existing default and propagate to threads spawned inside its closure.

    측정한 것assert Span::record updates a field declared with tracing::field::Empty and the event observes the entered span scope

  20. cargo샘플 컨트랙트rust · linux/x64tower-layer@0.3.3

    믿는 것A competent developer would expect a shared `&Layer` to behave like independent applications and not accumulate per-wrap side effects when reused.

    측정한 것assert that the same borrowed layer can be used for multiple `Layer::layer` calls and the call count is cumulative

  21. cargo샘플 컨트랙트rust · linux/x64reqwest@0.13.4

    믿는 것Policy::limited(0) is equivalent to Policy::none(), and a custom redirect attempt's previous list excludes the initial request URL.

    측정한 것Policy::none returns the original 302 response without treating the redirect as an error

  22. npm샘플 컨트랙트node · linux/x64marked@18.0.9

    믿는 것Custom renderer methods in marked receive positional primitive arguments like heading(text, level) and link(href, title, text) with child tokens pre-rendered into HTML strings.

    측정한 것Overriding a custom renderer method with legacy positional parameters like heading(text, level) passes the AST token object as the first parameter and undefined as the second, silently rendering undefined and object Object in place of tag attributes and text

  23. npm샘플 컨트랙트node · linux/x64luxon@3.5.0

    믿는 것Parsing an invalid ISO date string or out-of-range calendar date in Luxon throws an Error or rolls over to a valid date.

    측정한 것DateTime.fromISO with an unparsable string or impossible calendar date does not throw and does not roll over, returning an invalid DateTime object with isValid false and toISO null

  24. npm샘플 컨트랙트node · linux/x64luxon@3.7.2

    믿는 것A correct `luxon` package with an ESM entry point allows `import { DateTime } from "luxon"` to execute normally from ES module code.

    측정한 것Importing `luxon` through a named ESM import from `node_modules` returns a usable `DateTime` export.

  25. npm샘플 컨트랙트node · linux/x64core-js@3.40.0

    믿는 것Object.groupBy returns a plain Object instance inheriting from Object.prototype with standard methods such as toString and hasOwnProperty.

    측정한 것Object.groupBy returns an object with a null prototype rather than Object.prototype, making instanceof Object evaluate to false and omitting standard methods like toString.

여기 있는 줄을 확인하는 방법

샘플을 열고 contract를 읽고 실행하십시오. contract는 그 샘플 자신의 테스트입니다. 네트워크를 끈 고정 컨테이너에서 실행되고, 그 실행의 서명된 영수증이 네트워크에 저장됩니다. 여기 있는 어떤 것도 라이브러리에 대한 우리의 해석에 기대지 않습니다. 라이브러리가 실제로 한 일에만 기댑니다.

게시된 샘플 중 일부는 이 페이지에 없습니다. 계약은 통과했고 샘플도 살아 있지만, 그 계약에 문장으로 읽힐 줄이 없기 때문입니다. expect(x).toBe(1) 같은 단언은 그것이 검사하는 믿음 옆에 놓아도 독자에게 아무것도 말해주지 않습니다. 읽을 수 없는 근거를 싣기보다는 뺀다는 쪽을 택했습니다.