CodeSampleX

Exemplo

determine coverage instrumentation with shouldInstrument and handle syntax errors with handlePotentialSyntaxError

sha256:e8ff88bce8caa42c2f11837fee8128755076f4cc3a99870d59820ab610d873ff

Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu. Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas. MIT-0

Evidência de execução

O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.

Base da evidência
Contrato assinado aprovado
Recibos de verificação
1
Chaves de assinatura que o compilaram
1
Ambiente declarado node linux 24 · ubuntu · glibc 2.39 x64 node node npm

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-26

Caso

HOW
Objetivo
determine coverage instrumentation with shouldInstrument and handle syntax errors with handlePotentialSyntaxError
Pacotes
Símbolos
  • handlePotentialSyntaxError
  • shouldInstrument
Ambiente
node
Criado
2026-08-26T06:42:10Z

Contrato

  1. shouldInstrument is a callable function exported by @jest/transform
  2. shouldInstrument returns true for source files matching collectCoverageFrom patterns
  3. shouldInstrument returns false when collectCoverage option is disabled
  4. shouldInstrument returns false for ignored paths specified in coveragePathIgnorePatterns (e.g. node_modules)
  5. shouldInstrument returns false for test files matching testMatch or testRegex
  6. shouldInstrument returns true for test files when overridden by forceCoverageMatch
  7. shouldInstrument returns false for JSON files and files in __mocks__ directories
  8. handlePotentialSyntaxError is a callable function exported by @jest/transform
  9. handlePotentialSyntaxError returns non-SyntaxError instances unmodified without throwing
  10. handlePotentialSyntaxError throws enhanced SyntaxError containing code frame and Jest diagnostic explanation

Arquivos

  • NOTES.md
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • src/index.mjs
  • test/contract.mjs

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

anônimo