You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests using implicit testing vs explicit assertions #417
When migrating from kcd-scripts to a native ESLint configuration, the Jest plugin for ESLint failed some of our tests because they violated the expect-expect rule. Because of that, I allowed the tests to pass by adding a comment above for the linter, as seen in the pr this comment started within. See example below.
When we move to vitest (if we move) this might no longer be an issue but ignoring this rule for now allows us to move forward with native linting config without test rewrites.
/Whenwemovetovitestthismightnotbeanissueanymore// eslint-disable-next-line jest/expect-expecttest('attaches no token when not supplied',async()=>{nock('https://api.github.com').matchHeader('authorization','').get('/users/test-token').reply(200,{html_url: 'test-token',})awaitgetUserInfo('test-token')})
Added some inline todos as I made some decisions here that I'd like to better understand! I don't know what best practices are in the JS world, but the {} seems like the modern way to "catch" an error without doing anything with it.
Activity
[-]Tests using implicit testing vs explicity assertions[/-][+]Tests using implicit testing vs explicit assertions[/+]lwasser commentedon Feb 13, 2026
closing this as i suspect with the move to more current tooling it's not going to be relevant.