Don't auto-scroll unit tests if you scrolled up
This commit is contained in:
parent
17ad654d60
commit
7c3bbe9278
|
@ -32,7 +32,13 @@ if (typeof Promise === 'undefined') {
|
||||||
|
|
||||||
describe('Unit Tests', function () {
|
describe('Unit Tests', function () {
|
||||||
|
|
||||||
if (typeof window !== 'undefined') { afterEach(function () { window.scrollTo(0, document.body.scrollHeight); }); }
|
if (typeof window !== 'undefined') {
|
||||||
|
afterEach(function () {
|
||||||
|
if (window.scrollY >= document.body.scrollHeight - window.innerHeight - 100) {
|
||||||
|
window.scrollTo(0, document.body.scrollHeight);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
require('./crypto');
|
require('./crypto');
|
||||||
require('./general');
|
require('./general');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user