-
Notifications
You must be signed in to change notification settings - Fork 0
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
Beminfo 1352 #40
Beminfo 1352 #40
Conversation
…asks/libraries-db.js task module
Пожалуйста посмотрите этот pr. |
describe('_getRootLibNodes', function () { | ||
it('should return empty list of root library nodes', function () { | ||
return task._getRootLibNodes(target).then(function (result) { | ||
result.should.be.instanceOf(Array).and.have.length(0); |
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.
Может лучше result.should.be.instanceOf(Array).and.be.empty();
?
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.
А вот не работает: Property 'empty' of object # is not a 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.
на самом деле, кажется что не так важно как написать эту проверку
@tormozz48 нужна встреча |
var local = JSON.parse(JSON.stringify(remote)), | ||
result = task._compareRegistryFiles(target, local, remote); | ||
|
||
result.should.be.instanceOf(Object); |
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.
Кажется, что проверка лишняя
result.modified.should.have.length(0); | ||
result.removed.should.have.length(0); | ||
result.added.should.have.length(3); | ||
should.deepEqual(result.added, [ |
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(result.added).containEql({ lib: 'bem-core', version: 'v2' })
.and.containEql({ lib: 'bem-core', version: 'v2.5.1' })
.and.containEql({ lib: 'bem-core', version: 'v2.6.0' });
Я бы для всех тестов _compareRegistryFiles переписал как-то описания на |
it('should rejected with error if library version data file does not exists in MDS', function () { | ||
return task._saveLibraryVersionFile({ lib: 'bem-core', version: 'v2' }, target) | ||
.fail(function (error) { | ||
error.message.should.equal('Bla'); |
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.
А кто такую ошибку шикарную отдаёт?
No description provided.