principle-test-behavior-not-implementation: listed matchers do not all pass when imports return undefined
Mantenedores costumam responder em até 1 dia
@Yi-111-a já está trabalhando nisso.
Desde 1/10/2026.
Avaliação
- Dificuldade
- 1/5
- Tempo estimado
- Menos de uma hora
- Facilidade para iniciantes
- 88/100
- Tipo de issue
- Documentação
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- documentation
Direção de pesquisa
Comece por pstack/skills/principle-test-behavior-not-implementation/SKILL.md, especialmente pelas linhas 15-18, e compare cada matcher listado com o comportamento indefinido mostrado na issue. Atualize a explicação ou o agrupamento para que a afirmação de comportamento indefinido se aplique somente aos matcher que de fato passam, enquanto as asserções fracas, mas não vacuosas, sejam descritas com precisão.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Observed at commit 2eb7ed4613cfc8f098dfe464a23680ea44d84c5e: pstack/skills/principle-test-behavior-not-implementation/SKILL.md lines 15-18.
The skill's check is "would the test still pass if every function it imports returned undefined?" and it lists, as "Five shapes that still pass when every imported function returns undefined", assertions such as:
toBeDefined,toBeTruthy,toBeInstanceOf,toBeGreaterThan(0)toEqual([]),toHaveLength(0)
Problem
Several of these do not pass when the value is undefined:
expect(undefined).toBeDefined() // fails
expect(undefined).toBeTruthy() // fails
expect(undefined).toBeInstanceOf(Foo) // fails
expect(undefined).toBeGreaterThan(0) // throws (received value must be a number)
expect(undefined).toEqual([]) // fails
expect(undefined).toHaveLength(0) // throws (received value must have a length property)
They are weak assertions, but the stated reason ("still passes when every import returns undefined") is false for them, which can lead an agent following the rule to delete tests that do fail when the function breaks, or to distrust the check. (not.toThrow, toBeUndefined, not.toHaveBeenCalled and a missing expect do pass.)
Suggested fix
Describe the principle by what the test can detect rather than by matcher name: ask whether the assertion would still pass if the function returned a wrong but plausible value (an empty array, true, a different object). Either remove the matchers that fail on undefined from the list, or move them to a separate "weak but not vacuous" group with the accurate explanation, and keep the undefined claim only for the matchers that truly pass.
- Linguagem predominante
- TypeScript
- Estrelas
- 12.5k
- Forks
- 1.2k
- Merge médio
- 12h 32min
- PRs com merge (30d)
- 115
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cursor/plugins
-
Poteto Mode Claude CodeAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
create-plugin README documents a /create-plugin command that does not existTalvez já em andamento @lab1207 assumiu há 17 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
cursor/plugins#475 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
cursor-sdk auth.md: non-null assertion described as a runtime missing-variable checkTalvez já em andamento @lab1207 assumiu há 17 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
cursor/plugins#473 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
check-agent-compatibility: SKILL.md description has an unquoted colon, YAML parse failsTalvez já em andamento @rufushsu9987 assumiu há 31 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 95/100
cursor/plugins#381 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
pstack: disable-model-invocation skills still have "Use only when user ..." agent instructionsTalvez já em andamento @rufushsu9987 assumiu há 31 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
cursor/plugins#367 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cursor/plugins
Issues semelhantes
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)Talvez já em andamento @Jxxunnn assumiu hoje. AbertaBrowser Waiting for: Product Owner
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
getsentry/sentry-javascript#25497 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
e2e-failure ready-to-code
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
redhat-developer/rhdh-plugin-export-overlays#4438 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
resource: destroying a resource calls AbortController.abort() without a reason, creating an AbortError with a stack trace each timeTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaarea: core
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
angular/angular#71422 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug status: needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
facebook/docusaurus#12739 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 68/100
vercel/ai#23537 · 1 comentário ·
Mantenedores costumam responder em até 1 dia