Filter
Exclude
Time range
-
Near
दुनिया के सबसे ताकतवर रॉकेट स्टारशिप का 9वां टेस्ट हुआ फेल: लॉन्चिंग के 20 मिनट बाद कंट्रोल खोया, पृथ्वी के वातावरण में आने पर नष्ट dainik.bhaskar.com/D09LfV6WI… #STARSHIP #Testfail
8
3,051
When your test product sneaks its way to the client, and now you’re stuck explaining why they got a box of ‘Oopsie Poopsie’ instead of their order! #comics #testfail #oopsmoment #clientchaos #productmixup
1
18
That moment when you realize you studied the wrong chapter. 🤡 #TestFail #StudyHard #FunnyMemes #SchoolLife #StudentProblems #meme
1
2
8
71
28 Jan 2025
don't use testFail but: you might be using it and not even know! any test that starts with `testFail` will fail on successful execution, and pass on failed (reverted, etc) execution good luck if your `testFailedTransfer` test has a bug in it 🫡
For Foundry's next stable release we plan to remove `testFail*`. It has been marked as deprecated for quite some time and has long been discouraged. Do you still have any cases in your active codebases where you need to resort to using it?
1
7
1,216
For Foundry's next stable release we plan to remove `testFail*`. It has been marked as deprecated for quite some time and has long been discouraged. Do you still have any cases in your active codebases where you need to resort to using it?
3
4
9
3,481
This is why we don't playtest at night. Scary uncanny valley dolls show up to kill you while you r not looking. All I wanted to do was to test this cool teleport stone. #indiedev #gamefails #testfail #gamedev #horrorgame #horror
1
4
106
11 Sep 2024
Seems if you name a test 'testFail' plus whatever, the test will fail with an assert that is not even reasonable when you specify verbosity. I have tried with a couple of tests, all failed. I change naming scheme, tests passed.
2
2
97
28 Dec 2023
Yeah, testFail is there just to keep things compatible with DSTest
2
155
Did you know that you can write tests that are always mean to fail? Just use the prefix `testFail` Can be useful to check for calls that should never succeed
1
3
28
3,307
24 Nov 2023
Day 150 of writing a smart contract a day until someone hired me. SHFT Security WOW! Happy day 150 guys 🥳 If I knew when I started this that I would have made it 150 days I probably.... Well I probably would have started budgeting a bit more closely. But I also would be pretty proud of how far this account has gone. I know I've definitely learned a lot while writing and researching these posts. Anyways. What's today's continuation of the SHFT project? Security! So after getting that basic frontend set up (and doing a little bit of styling with TailwindCSS offscreen). It's time to go back to the smart contracts and secure things a bit. That double claim attack I talked about is a real problem. And we never actually added a "fund()" function to do anything with the funded contract. So I added the fund part into our happy path and various other security tests to make sure the owner can't call "fund()" without the time passing and goal being hit. Note that in Foundry all you have to do to make a test for failure function is start the function name with "testFail". Using the expect revert is probably a better way to do this, but I wanted to use testFail for this. A few further points - Most of the functions are collapsed so you can see them, sorry I can't screenshot the whole thing it's getting too big. - I am not testing for Fund's behavior (adding liquidity to Uniswap). Mainly because I don't want to actually add it to the contract. Sorry but I've done this before and I don't actually care much to do it for a demo thing because it's always a pain. So as of now things don't compile, since that "fund()" function doesn't exist. So we'll make that function, then fill everything out to make these tests pass tomorrow!
3
1
109
This was a great talk! Only minor note I have is that testFail is considered bad practice, you should always explicitly assert the error you are expecting otherwise a generic EVM revert can allow the test to pass.
1
3
182
Replying to @PatrickAlphaC
Can you plz also roll out some `best practices` when using Foundry? For example, I see too many tutorials using `testFail` which is now deprecated rather than the preferred `test_Revert[If/When]` style.
1
1
180
26 May 2023
We will also be removing support for testFail. The expected pattern will now be to use expectRevert instead of letting the test function revert as a whole. While more strict, this will ensure your tests fail due to the reason you expect them to. This will also be undergoing QA.
1
7
407
Got a message but no loud alarm. Phone was on silent but it was still supposed to sound. Girlfriend's phone got the noise so at least she'd survive #emergencyalert #testfail #pissupinabrewery
4
361
Did your phone go off? Mine didn't, but I'm only ever connected to WiFi/VoIP as there's no reception in the countryside. (Or decent broadband for that matter!). #testFail
38
1
69
24,265
28 Dec 2022
Not only do I think that using `testFail` spoils the glamour quotient of your testing suite, but it also increasingly feels like a bad practice. The reason is that when you are using `testFail`, you are not entirely sure of WHY your test should fail and that is a red flag
1
8
833
Replying to @gakonst
testFail always felt weird and even scary (what if it fails for a reason I don't want it to fail?), no way to limit the type of error etc. After discovering expectRevert I never found a good use case for testFail
14
1 Dec 2022
Replying to @gakonst
Maybe have one version where it's an opt-in feature before completely disabling but I'd be for removal. `testFail` is an anti-pattern bc tests pass if it fails for any reason, `expectRevert` forces you to specify how you think the failure should occur
10
1 Dec 2022
Replying to @gakonst
please don't remove it from the codebase. Just leave it there 😅 You can track the usage of testFail here sourcegraph.com/search?q=con… (note: this includes repo that use ds-test)
2
4
How bad would it be if we removed support for testFail in foundry? Unnecessary since expectRevert, have kept for backwards compatibility but maybe time to leave behind
21
53