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

i-bem__dom: Fix leaking test #1369

Merged
merged 1 commit into from
Jun 3, 2016
Merged

i-bem__dom: Fix leaking test #1369

merged 1 commit into from
Jun 3, 2016

Conversation

qfox
Copy link
Member

@qfox qfox commented May 31, 2016

Just found that accindentally and decide to fix.
Am I right here?

/cc @veged @dfilatov @narqo

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 56.582% when pulling a473efb on hotfix/i-bem-leaking-spec@v3 into e61d268 on v3.

}
}
}
});

DOM.decl('block2');

DOM.init(BEMHTML.apply({
var node = $(BEMHTML.apply({
Copy link
Member

Choose a reason for hiding this comment

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

в скоупе есть rootNode, которая потом afterEach дестрактится

Copy link
Member Author

Choose a reason for hiding this comment

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

но мы в неё же не можем подмешать другой onSetMod.js.inited?

@qfox qfox force-pushed the hotfix/i-bem-leaking-spec@v3 branch from a473efb to d01ccf2 Compare June 1, 2016 22:57
@coveralls
Copy link

Coverage Status

Coverage remained the same at 56.533% when pulling d01ccf2 on hotfix/i-bem-leaking-spec@v3 into e61d268 on v3.


delete DOM.blocks['block'];
delete DOM.blocks['block2'];

res.should.be.eql([true, true]);
Copy link
Member

Choose a reason for hiding this comment

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

зачем res? можно проверить прямо в том месте где присваивание — всё работает синхронно

Copy link
Member Author

Choose a reason for hiding this comment

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

синхронно дестракт не вызовется, потому что throw будет в случае облома.

Copy link
Member Author

Choose a reason for hiding this comment

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

Хотя, это же тесты, и если оно упало — можно забить на всё остальное, потому что 1 тест это уже плохо.

Copy link
Member

Choose a reason for hiding this comment

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

ок, согласен — тогда оставь так

@veged veged merged commit 9e957a9 into v3 Jun 3, 2016
@veged veged deleted the hotfix/i-bem-leaking-spec@v3 branch June 3, 2016 08:29
@veged veged removed the ready label Jun 3, 2016
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.

None yet

3 participants