CodeSampleX

네트워크가 찾아낸 것

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

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

597개 발견, 8개 생태계.

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

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

  1. npm샘플 컨트랙트node · linux/x64@babel/core@8.0.1

    믿는 것Targeting an environment with known JavaScript engine bugs forces preset-env to downlevel the surrounding modern ES2015+ syntax categories down to ES5 helper functions.

    측정한 것preset-env targeting Safari 14 preserves native ES2015 destructuring syntax and parameter defaults while surgically renaming only the colliding parameter identifier to avoid JavaScriptCore scope shadowing bugs

  2. npm샘플 컨트랙트node · linux/x64@babel/preset-env@7.29.7

    믿는 것Leaving useBuiltIns unset in @babel/preset-env automatically injects polyfills for unsupported ECMAScript standard library methods across configured target environments when corejs is configured or core-js is imported.

    측정한 것When useBuiltIns is unset, @babel/preset-env defaults to false and leaves standard library methods un-polyfilled without injecting any core-js imports, even when targets lack support or corejs is specified.

  3. npm샘플 컨트랙트node · linux/x64@babel/preset-env@8.0.2

    믿는 것In Babel presets, legacy configuration options like loose, spec, bugfixes, and useBuiltIns remain accepted as valid options, and isPluginRequired continues to be exported as a helper function.

    측정한 것Passing loose, spec, bugfixes, or useBuiltIns to @babel/preset-env in major version 8 throws descriptive removal errors rather than accepting legacy configuration options or polyfill strategies.

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

    믿는 것Subclassing Command with a static getDefaultName method automatically defines the command name on instantiation, and closures assigned via setCode may omit explicit integer return values.

    측정한 것Command subclasses defining static getDefaultName() have a null name in Symfony Console 8 because getDefaultName() was removed in favor of #[AsCommand], and Application::addCommand() throws LogicException for empty names.

  5. npm샘플 컨트랙트node · linux/x64@rollup/plugin-commonjs@29.0.3

    믿는 것When bundling CommonJS modules that conditionally require Node built-ins into ESM, @rollup/plugin-commonjs preserves lazy evaluation inside functions without hoisting static imports to the module top level.

    측정한 것By default, @rollup/plugin-commonjs hoists conditional require('node:fs') calls to top-level ESM static imports, eagerly loading built-in modules on startup rather than preserving lazy CommonJS evaluation.

  6. npm샘플 컨트랙트node · linux/x64@rollup/plugin-commonjs@28.0.9

    믿는 것By default @rollup/plugin-commonjs transforms require expressions into bundled module imports in any file processed by Rollup.

    측정한 것assert requireReturnsDefault defaults to false, returning an augmented namespace object with __esModule marker rather than unwrapping default export directly when CJS requires ESM

  7. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것A good model expects CSV to inherit its default `row_sep` from `$INPUT_RECORD_SEPARATOR` whenever `row_sep` is not passed.

    측정한 것assert that setting `$INPUT_RECORD_SEPARATOR` to "|" and calling `CSV.new("a,b")` yields `row_sep == "\n"`

  8. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것The CSV :numeric and :integer converters parse numeric string values using base-10 decimal representation.

    측정한 것CSV.parse_line with converters: :numeric parses leading-zero strings like 012 as octal integer 10, whereas strings with non-octal digits like 008 fall through to float 8.0 rather than parsing as decimal integers or strings

  9. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것CSV.parse treats an input IO stream as caller-managed and leaves it open after parsing, while CSV.open and CSV.foreach automatically release underlying file handles.

    측정한 것CSV.parse(io) without a block permanently closes the caller-provided IO or StringIO stream upon completion, whereas CSV.parse(io) with a block leaves the stream open

  10. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것Calling CSV.instance twice with the same source should create independent parser state that starts from the beginning each time.

    측정한 것CSV.instance caches one parser per source object and option set, so the second call with the same source reuses the first parser's cursor instead of starting over.

  11. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것Passing converters: :numeric parses numeric strings with leading zeros as decimal numbers or preserves them consistently as strings.

    측정한 것CSV.parse_line with converters: :numeric parses leading-zero strings with octal digits 0-7 as octal integers while strings containing 8 or 9 fall back to floats, mutating 0123 into 83 and 0890 into 890.0 across a round trip

  12. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것CSV::InvalidEncodingError inherits from Ruby core's EncodingError, and liberal_parsing: true suppresses unclosed quote errors.

    측정한 것CSV::InvalidEncodingError inherits from CSV::MalformedCSVError and RuntimeError rather than EncodingError, so rescue EncodingError fails to catch byte sequence errors during parsing.

  13. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것CSV.parse returns empty strings for unquoted empty fields between delimiters by default.

    측정한 것assert parsing unquoted empty fields returns nil rather than empty string when nil_value is left unset

  14. gem샘플 컨트랙트ruby · linux/x64csv@3.3.2

    믿는 것A developer expects duplicated header values to follow normal Ruby Hash last-wins semantics when using CSV row conversion.

    측정한 것CSV.parse("id,id,name\n1,2,alice\n", headers: true).first.to_h["id"] evaluates to "1", not "2", because CSV::Row#to_h preserves the first duplicate header.

  15. cargo샘플 컨트랙트rust · linux/x64winnow@1.0.4

    믿는 것Calling `Parser::default_value()` makes a parser yield the default value whenever the wrapped parser fails.

    측정한 것assert `alpha1.default_value()` on '123' returns `Err(ErrMode::Backtrack(_))` instead of falling back to `0`

  16. npm샘플 컨트랙트node · linux/x64@babel/core@8.0.1

    믿는 것loadPartialConfig({...}) returns a PartialConfig object synchronously, because that is how every Babel 7 example, README snippet, and tool integration calls it; the callback form was always optional.

    측정한 것Calling loadPartialConfig() without a callback in Babel 8 throws an Error whose message names loadPartialConfigSync as the required synchronous replacement — in Babel 7 the identical call returned a PartialConfig object without throwing.

  17. hex샘플 컨트랙트elixir · linux/x64nimble_csv@1.3.0

    믿는 것When a parser is defined with separator: ["|", ";"], dumping rows that were parsed from semicolon-delimited input will preserve the semicolon separator, because the parser accepted that format.

    측정한 것Parsing semicolon-separated CSV with a multi-separator parser succeeds, but dump_to_iodata emits pipe-separated output — the first separator in the list — not the semicolon the input used, because the dump separator is fixed at compile time by the first list entry.

  18. hex샘플 컨트랙트elixir · linux/x64nimble_pool@1.1.0

    믿는 것A model expects that starting a lazy pool with lazy: true defers worker module validation until checkout, allowing start_link to return {:ok, pid} even when given an unresolvable worker module or an atom :infinity for pool_size.

    측정한 것NimblePool.start_link/1 with lazy: true eagerly ensures the worker module is loaded in init/1 and fails pool startup with an ArgumentError when the module is not found.

  19. hex샘플 컨트랙트elixir · linux/x64ecto@3.12.5

    믿는 것Ecto.Multi.run/3 accepts a single-argument callback receiving the accumulated changes map, matching other Multi dynamic callbacks and Ecto 2 conventions.

    측정한 것assert Ecto.Multi.run/3 requires a 2-arity function taking repo and changes and raises FunctionClauseError on a 1-arity function, whereas Multi.insert/3 and Multi.merge/2 accept 1-arity functions receiving only changes

  20. golang샘플 컨트랙트go · linux/x64net/http@go1.26.5

    믿는 것Once net/http drops Authorization for a cross-domain redirect, the header stays absent for the rest of the chain — but before go1.23.7 / go1.24.1, a same-domain hop immediately following a cross-domain hop silently restores Authorization to the request, leaking the credential to the second domain while the HTTP response stays 200.

    측정한 것After a three-hop redirect chain where the first cross-domain hop strips Authorization, the Authorization header must be absent at the same-domain second hop on serverB — before go1.23.7 / go1.24.1 this assertion fails silently with a 200 response.

  21. golang샘플 컨트랙트go · linux/x64net/http@v1.26.5

    믿는 것Setting http.Transport.MaxIdleConns to a high value allows all idle connections to a single target host to be pooled when MaxIdleConnsPerHost is left unset.

    측정한 것Leaving http.Transport.MaxIdleConnsPerHost unset (0) with MaxIdleConns set to 100 retains only 2 idle connections for a host, rejecting the 3rd connection with 'too many idle connections for host'.

  22. golang샘플 컨트랙트go · linux/x64net/http@go1.22.0

    믿는 것ReadHeaderTimeout enforces a deadline on reading the request body

    측정한 것the server handler takes >2s to read the request body despite ReadHeaderTimeout=1s

  23. golang샘플 컨트랙트go · linux/x64net/http@v1.26.5

    믿는 것Calling resp.Body.Close() — the pattern shown in every tutorial — is sufficient for http.Transport to reclaim and reuse the underlying TCP connection for the next request.

    측정한 것When resp.Body.Close() is called without draining the body first, http.Transport opens a brand-new TCP connection for the very next request to the same host, measured via httptrace.GotConnInfo.Reused being false.

  24. golang샘플 컨트랙트go · linux/x64net/http@v1.26.5

    믿는 것A second request on the same `http.Client` should proceed after the first `Do` call returns, even if that first response body is never read or closed.

    측정한 것A second request using the same `http.Client` and `http.Transport{MaxConnsPerHost: 1}` does not complete while the first response body remains open, returning a context timeout instead.

  25. golang샘플 컨트랙트go · linux/x64net/http@go1.26.5

    믿는 것A setting named `GODEBUG=http2server=0` only affects debug output, so an explicit HTTP/2-only setup should still work.

    측정한 것An HTTP/2-only client-server pair should negotiate and return `HTTP/2.0` by default, while the same code with `GODEBUG=http2server=0` must fail because no shared protocol is available.

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

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

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