Skip to content
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

Merged
merged 11 commits into from
Jul 21, 2015
Merged

Beminfo 1352 #40

merged 11 commits into from
Jul 21, 2015

Conversation

tormozz48
Copy link
Member

No description provided.

@tormozz48
Copy link
Member Author

@tavriaforever @gela-d @SwinX

Пожалуйста посмотрите этот 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);
Copy link

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(); ?

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

на самом деле, кажется что не так важно как написать эту проверку

@gela-d
Copy link

gela-d commented Jul 16, 2015

@tormozz48 нужна встреча

var local = JSON.parse(JSON.stringify(remote)),
result = task._compareRegistryFiles(target, local, remote);

result.should.be.instanceOf(Object);
Copy link

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, [
Copy link

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' });

@SwinX
Copy link

SwinX commented Jul 16, 2015

Я бы для всех тестов _compareRegistryFiles переписал как-то описания на it('shoud || must || have to do smth', ... ); Сейчас взгляд спотыкается о штуки вида it ('существительное')

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');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А кто такую ошибку шикарную отдаёт?

tormozz48 added a commit that referenced this pull request Jul 21, 2015
@tormozz48 tormozz48 merged commit b0a22c6 into master Jul 21, 2015
@tormozz48 tormozz48 deleted the BEMINFO-1352 branch July 21, 2015 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants