CodeSampleX

Lo que la red encontró

Cada línea de abajo es una medición, no una opinión. Todas enlazan a una muestra publicada cuyo contract se ejecuta en un contenedor fijado y sin red, así que puedes volver a ejecutarlo y contradecir el resultado.

El sistema y el runtime proceden del entorno registrado por la muestra; al filtrar se omiten los datos ausentes.

597 hallazgos en 8 ecosistemas.

Lo que dice la muestra y mide su contrato

201–225 de 568, medidos por muestras publicadas.

  1. npmContrato de muestranode · linux/x64@babel/preset-env@7.29.7

    Se creea regular expression with named capture groups compiled by Babel will preserve the exact syntactic shape of the pattern in its .source property

    Medidothe .source property of a named capture group regex transpiled for IE11 evaluates to a string stripped of the capture group names, rather than the original source string

  2. npmContrato de muestranode · linux/x64@babel/preset-env@8.0.2

    Se cree@babel/preset-env defaults the modules option to commonjs, unconditionally transforming import statements into require calls regardless of caller capabilities.

    MedidoWhen the modules option is left unset, @babel/preset-env defaults to 'auto' and preserves static import and export declarations unchanged when caller.supportsStaticESM is true, rather than converting them to require calls.

  3. npmContrato de muestranode · linux/x64express@4.18.2

    Se creeLeaving the query parser unconfigured in Express parses query string parameters into flat key-value pairs without constructing nested objects.

    MedidoWhen the `query parser` setting is left unset on an Express application, Express defaults `app.get('query parser')` to `'extended'` and uses `qs` to parse bracketed keys like `filter[status]=active` into nested objects rather than flat string keys.

  4. npmContrato de muestranode · linux/x64express@4.21.2

    Se creeres.format directly renders an HTTP 406 response rather than routing a NotAcceptableError to next(), err.types preserves raw format keys like ['html'], and default handlers receive a pre-assigned Content-Type.

    Medidores.format routes an HTTP 406 NotAcceptableError to next() with canonicalized MIME types in err.types and unconditionally sets Vary: Accept when no registered format matches the Accept header and no default handler is provided

  5. npmContrato de muestranode · linux/x64@babel/preset-env@7.24.7

    Se creePassing useBuiltIns: true enables polyfilling, corejs: 4 configures next-generation core-js polyfills, and modules: 'esm' enables ES module output.

    MedidoPassing useBuiltIns: true throws an Error requiring 'false', 'entry', or 'usage', while passing corejs: 4 with polyfilling throws a RangeError rejecting versions outside core-js@2 and core-js@3.

  6. hexContrato de muestraelixir 1 · linux/x64req@0.7.2

    Se creeA nil or empty-list Req header is absent from the internal map, so put_new_header supplies a fallback and get_header distinguishes it from a missing header.

    Medidoassert Req.new retains nil and empty-list header keys with empty-list values while get_header returns [] for both those keys and missing keys

  7. hexContrato de muestraelixir 1 · linux/x64req@0.7.2

    Se creeAn into: :self response body can be enumerated from another process, and a Collectable receives response bytes for every status code.

    Medidoassert an into: :self body is a Req.Response.Async tied to the requester pid and enumeration in another process raises RuntimeError

  8. hexContrato de muestraelixir 1 · linux/x64req@0.7.2

    Se creeTwo overlapping Req calls made from one request value each enumerate a shared one-shot body independently and both receive all four chunks.

    Medidoassert two overlapping Req.request! calls consume exactly four chunks in total from the shared Agent-backed stream

  9. hexContrato de muestraelixir 1 · linux/x64req@0.7.2

    Se creeReq archive decoders return string-keyed maps, compressed JSON decodes without the compressed option, and normalized header access returns scalar strings.

    Medidoassert decode_body leaves the tested gzip JSON bytes unchanged when compressed is false and decodes them after decompress_body runs with compressed true

  10. hexContrato de muestraelixir 1 · linux/x64req@0.7.2

    Se creeFollowing a 303 after a JSON POST keeps the POST method, encoded body, and content-type on the redirected request.

    Medidoassert the offline adapter first receives POST /start whose body iodata becomes the exact JSON bytes and whose content-type is application/json

  11. hexContrato de muestraelixir · linux/x64req@0.7.2

    Se creeReq preserves Authorization headers across cross-origin redirects by default, retains the POST method when following 301 and 302 redirects, and sends no automatic accept-encoding headers unless compressed is requested.

    Medidoassert same-origin redirects preserve Authorization headers while cross-origin redirects to a different host strip them

  12. hexContrato de muestraelixir · linux/x64req@0.7.2

    Se creePassing a malformed adapter to Req.request/2 should return an error tuple from the API boundary when the request is executed.

    Medidoassert RuntimeError is raised when an adapter returns a non-tuple shape instead of {request, response} or {request, exception}; Req.request/2 is used (not a stubbed plugin path).

  13. hexContrato de muestraelixir · linux/x64req@0.7.2

    Se creeMerging a leading-slash path into a base_url in Req replaces the base path following RFC 3986, and setting a body on a default request sends a GET request.

    Medidoassert Req.Steps.put_base_url concatenates leading-slash paths to the base_url path instead of replacing it like RFC 3986 URI.merge

  14. hexContrato de muestraelixir · linux/x64req@0.7.2

    Se creeProviding `path_params` should replace a URL placeholder like `{id}` even when `path_params_style` is not set.

    MedidoCurly placeholders in the URL are not interpolated by default, so `{id}` stays unreplaced when `path_params_style` is omitted.

  15. hexContrato de muestraelixir 1 · linux/x64nimble_options@1.1.1

    Se creetype: nil leaves a NimbleOptions key untyped, the same as omitting :type.

    Medidoassert type: nil accepts nil and rejects tested non-nil values while an omitted type accepts arbitrary terms

  16. hexContrato de muestraelixir 1 · linux/x64nimble_options@1.1.1

    Se creeNimbleOptions.new! reports an invalid schema with NimbleOptions.ValidationError, matching value-validation failures.

    Medidoassert NimbleOptions.new! with an unknown type atom raises ArgumentError

  17. hexContrato de muestraelixir 1 · linux/x64nimble_options@1.1.1

    Se creeA NimbleOptions custom validator can be an anonymous function that returns a boolean and receives its value after any configured arguments.

    Medidoassert a custom validator uses an MFA 4-tuple, receives the option value first, returns {:ok, transformed} or {:error, message}, and can replace the validated value

  18. hexContrato de muestraelixir 1 · linux/x64nimble_csv@1.3.0

    Se creePassing separator: "\t" to NimbleCSV.RFC4180.parse_string/2 changes that predefined parser's delimiter for the call.

    Medidoassert RFC4180 parse_string with separator: tab and skip_headers: false keeps each tabbed line as one field

  19. hexContrato de muestraelixir 1 · linux/x64nimble_csv@1.3.0

    Se creeNimbleCSV.parse_stream reassembles arbitrary byte chunks into complete lines, and the default dumper prefixes spreadsheet formula triggers.

    Medidoassert parsing the arbitrary chunks directly does not yield the complete expected table while RFC4180.to_line_stream reconstructs five complete lines and enables that parse

  20. hexContrato de muestraelixir 1 · linux/x64ecto@3.14.1

    Se creeParameterized types in Ecto schemas are represented as three-element tuples of {:parameterized, module, params}, and casting an Ecto.Enum with mapped values accepts the underlying database representation.

    Medidoassert schema type for an Ecto.Enum is a 2-element tuple {:parameterized, {Ecto.Enum, info}} rather than a 3-element tuple, Ecto.Type.parameterized? identifies it, and Ecto.Type.type returns the underlying primitive storage type

  21. hexContrato de muestraelixir · linux/x64ecto@3.14.1

    Se creeA competent developer expects put_assoc/4 to associate child records directly onto any struct or changeset, assuming schema association fields default to empty collections or nil when newly constructed.

    MedidoCalling put_assoc/4 on a loaded struct with unloaded associations raises RuntimeError because uninitialized associations hold an %Ecto.Association.NotLoaded{} struct rather than nil or [], and Ecto.assoc_loaded?/1 returns false.

  22. hexContrato de muestraelixir · linux/x64ecto@3.14.1

    Se creeDeclaring @primary_key {:id, :binary_id, autogenerate: true} on an Ecto schema sets the default foreign key type for belongs_to associations to :binary_id, allowing UUID string foreign key parameters to be cast without explicit type configuration.

    Medidoassert belongs_to defaults the foreign key field type to :id integer even when @primary_key is configured as :binary_id, causing binary UUID string parameters to fail with a cast validation error

  23. hexContrato de muestraelixir · linux/x64ecto@3.14.1

    Se creeA competent Ecto user expects `optimistic_lock/2` to protect updates using the row's current stored `:lock_version`, and that unsafely cast `:lock_version` params cannot influence the value used in the conflict check.

    MedidoWhen `:lock_version` is not cast, `optimistic_lock/2` keeps the filter at the struct value, but once `:lock_version` is allowed in `cast/3`, `optimistic_lock/2` switches the filter to that user-supplied value, so checks can run against a client-controlled token.

  24. hexContrato de muestraelixir 1 · linux/x64ecto@3.14.1

    Se creecast/4 accepts the underlying database representation for mapped enums, unmapped enums dump as atoms or integers, and load/3 accepts the same string and atom values as cast/4.

    Medidoassert cast accepts declared atom/string keys and mapped database values for Ecto.Enum, normalizing them to the declared atom while rejecting values outside both sets

  25. hexContrato de muestraelixir 1 · linux/x64ecto@3.14.1

    Se creeAn Ecto query binding list must name every intermediate join, so `[first, ..., last]` cannot select the outer bindings.

    Medidoassert a query with two joins compiles when a follow-up from expression uses the binding list [first, ..., last]

Cómo comprobar cualquier línea de aquí

Abre la muestra, lee su contract y ejecútalo. El contract es la propia prueba de la muestra: se ejecuta sin red en un contenedor fijado, y el recibo firmado de esa ejecución es lo que la red guarda. Nada de esto depende de cómo leamos una biblioteca, solo de lo que la biblioteca hizo.

Algunas muestras publicadas no están en esta página. Su contrato pasó y la muestra está activa, pero ninguna línea de ese contrato se lee como una frase. Una aserción como expect(x).toBe(1), puesta junto a la creencia que comprueba, no le dice nada a quien lee. Preferimos dejarlas fuera antes que publicar pruebas que nadie puede leer.