-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add normalize2 stub and tests #41
Conversation
const test = require('ava'); | ||
const normalize = require('../../lib/normalize2'); | ||
|
||
test('should support block', t => { |
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.
Добавили
Хорошо бы подумать про обработку невалидных кейсов, которые, не указаны в |
} | ||
|
||
if (!isNotActual(mod) && !elem) { | ||
normalizeMods(block, mod); |
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.
почему не сделать {block, mod}
?
Теоретически можно после нормализации делать Даже если оно сейчас будет работать после fulfill правильно — block: undefined выглядит не очень понятно. |
f328972
to
9676535
Compare
|
@zxqfox да, проблем не вижу, спасибо |
lgtm |
|
||
if (!decl) { return res; } | ||
|
||
if (typeof decl === 'string' || !(Symbol.iterator in decl)) { |
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.
!(Symbol.iterator in decl)
это лучше чем Array.isArray
? или предпологаем что могут быть любые итерируемые?
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.
🎱 |
Test to understand and format required format