Похожие чаты

The reason I asked this question: We read what the

code do with its tests and the person who read it will get confused, I thought may there be an standard.
may a better question be: should I put API and _foo() test in same file or test it in separate file?

1 ответов

15 просмотров

No need. Ideally the tests for all code in a source file are located together. All testing code looks similar and follow the AAA pattern. So reading and understanding regular code is not the same as reading and understanding test code. Test code is more easier to read. So you don't have to go out the way to make it more easier for developers by trying to organize your test code. As long as you follow certain naming conventions for your test code, people should be able to easily find the test code for some code and go through it irrespective of whether it is surrounded by other test code.

Похожие вопросы

Обсуждают сегодня

Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
I get confused when people talk about the ‘bull market’ and the ‘next bull market’ as if anyone really has a clue what’s really going on in the world. First of all - there i...
Shah
1
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
Добрый день, подскажите, пожалуйста, по проблеме. Сегодня на работе утром обнаружилось что по рдп подключиться не получается к серверу 2022. В серверную зашел - на системно...
srv
19
И никого не интересует какие пакеты кто использует. ((% Заходишь на сайт симфони и видишь поддержку Украины - по законам РФ это ж экстремизм. Только никто не отказывается от с...
Am Ambrion
11
Мне вот любопытно. Уже сколько времени имею соблазн купить макбук, ибо подозреваю что очень уж удобен будет в связке с другой техникой от эпл которая у меня есть, да и сам по ...
Not Yeromin
9
лучше скажите, причём тут паскаль?
Alexey Kulakov
36
Карта сайта