1 | QUnit.test( "hello test", function(assert) {
|
2 | scrollDir();
|
3 | assert.ok(1 == "1", "Passed!");
|
4 | });
|
5 | QUnit.test( "Is scroll intent there?", function(assert) {
|
6 | scrollDir();
|
7 | assert.equal(document.querySelector('[data-scrolldir]').getAttribute('data-scrolldir'), 'down', 'there should be a scroll intent');
|
8 | });
|
9 | QUnit.test( "scrollDir off", function(assert) {
|
10 | scrollDir({off: true});
|
11 | assert.equal(document.querySelector('[data-scrolldir]').getAttribute('data-scrolldir'), 'off', 'scrolldir should read as off');
|
12 | });
|
13 | QUnit.test( "scrollDir has a different attribute", function(assert) {
|
14 | scrollDir({attribute: 'data-scroll-direction'});
|
15 | assert.equal(document.querySelector('[data-scroll-direction]').getAttribute('data-scroll-direction'), 'down', 'scrolldir attribute should be scroll-direction');
|
16 | });
|
17 | QUnit.test( "scrollDir has a different attribute", function(assert) {
|
18 | scrollDir({el: document.body, attribute: 'data-scroll-new-attribute'});
|
19 | assert.equal(document.querySelector('[data-scroll-new-attribute]').getAttribute('data-scroll-new-attribute'), 'down', 'scrolldir attribute should be on a new element');
|
20 | });
|