-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec for unordered tech dependencies #25
Conversation
@blond посмотри пожалуйста. Предлагаю ревью делать по каждому файлу отдельно. Т.е. пока 1 полностью не вычитаем - к следующему не переходить. |
Убрал лишние describe. |
expect(resolved.entities).to.contain({ block: 'B' }); | ||
}); | ||
|
||
it('should include entity once if entity depends on tech of itself', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Странный тест, зачем он здесь?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Думаю, можно убрать, он дублирует уже проверенное.
Слова в названии файлов пишем через минус ;) Вроде бы можно оставить только слово |
); | ||
}); | ||
|
||
it('should resolve multiple tech in entity depending on tech in another entity and this tech matches ' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что мы тут хотим проверить, что если есть лишние технологии то из-за них не проигнорируется то что нужно?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Что несколько технологий в 1 сущности могут зависеть от другой технологии и если эта технология совпадает с раскрываемой сейчас - она будет включена и попадёт в entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ок
Написал замечания и вопросы. По кейсам их |
👍 |
opts = { tech: 'css' }, | ||
resolved = resolve(decl, deps, opts); | ||
|
||
expect(resolved.dependOn).to.be.contain({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы никак не проверили, что B не попадёт в полу entities
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Из формулировок should resolve не очень понятно на какой именно результат мы хотим проверить. Может быть стоит все тесты в tech-tech
разбить на 2 группы: проверка entities
, проверка dependOn
?
Распилил tech-tech спеку на 2 части, убрал лишние тесты. |
…sections: entity - entity for tech, entity - tech, tech - entity and tech - tech dependencies
Поправил tech-tech зависимости. |
Spec for unordered tech dependencies
👍 |
/cc @tadatuta |
resolve = require('../../../lib/index').resolve; | ||
|
||
describe('resolving unordered dependencies: entity - tech', function () { | ||
it('should resolve entity depending tech in another entity', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should resolve entity depending tech in another entity
по-русски ожидалось «должно резолвить сущность, которая зависит по технологии от другой сущности»?
если так, то я бы написал
should resolve entity depending by tech on another entity
и далее по коду я бы интуитивно писал «depending by tech on»
Spec has 4 parts:
entity - entity
deps for specifictech
entity - tech
depstech - entity
depstech - tech
depsResolves #12