Skip to content

Commit 68335e2

Browse files
committed
tests infrastructure refactoring
1 parent c4ff41b commit 68335e2

File tree

10 files changed

+254
-257
lines changed

10 files changed

+254
-257
lines changed

Gruntfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ module.exports = function (grunt) {
4444
},
4545
karma: {
4646
options: {
47-
configFile: './test/karma.conf.js',
47+
configFile: './test/config/karma.conf.js',
4848
runnerPort: 9100
4949
},
5050
default: {},
5151
compressed: {
5252
options: {
53-
files: require('./test/karma.conf.files.js').compressedFiles,
53+
files: require('./test/config/karma.conf.files.js').compressedFiles,
5454
port: 9876,
5555
autoWatch: false,
5656
keepalive: false,

test/BasicSetupSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ describe('uiScroll', function() {
8282
});
8383

8484
describe('basic setup (new datasource get signature)', function() {
85-
var scrollSettings = { datasource: 'myNewEmptyDatasource' };
85+
var scrollSettings = { datasource: 'myDescriptoEmptyDatasource' };
8686

8787
it('should call get on the datasource 2 times ', function() {
8888
var spy;
89-
inject(function(myNewEmptyDatasource) {
90-
spy = spyOn(myNewEmptyDatasource, 'actualGet').and.callThrough();
89+
inject(function(myDescriptoEmptyDatasource) {
90+
spy = spyOn(myDescriptoEmptyDatasource, 'get').and.callThrough();
9191
});
9292
runTest(scrollSettings,
9393
function() {

test/BasicTestsSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ describe('uiScroll', function () {
4343
});
4444

4545
describe('datasource with 3 elements and buffersize 3 (new get signature)', function() {
46-
var scrollSettings = { datasource: 'myNewOnePageDatasource', bufferSize: 3 };
46+
var scrollSettings = { datasource: 'myDescriptorOnePageDatasource', bufferSize: 3 };
4747

4848
it('should call get on the datasource 3 times ', function () {
4949
var spy;
50-
inject(function (myNewOnePageDatasource) {
51-
spy = spyOn(myNewOnePageDatasource, 'actualGet').and.callThrough();
50+
inject(function (myDescriptorOnePageDatasource) {
51+
spy = spyOn(myDescriptorOnePageDatasource, 'get').and.callThrough();
5252
runTest(scrollSettings,
5353
function () {
5454
expect(spy.calls.all().length).toBe(3);

test/config/karma.conf.files.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
var scrollerPath = '../../temp/'
2+
3+
var files = [
4+
'http://code.jquery.com/jquery-1.9.1.js',
5+
'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.js',
6+
'https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular-mocks.js',
7+
'../misc/test.css',
8+
'../misc/datasources.js',
9+
'../misc/scaffolding.js',
10+
'../*Spec.js',
11+
{
12+
pattern: scrollerPath + '*.js.map',
13+
included: false
14+
}
15+
];
16+
17+
module.exports.defaultFiles = files.concat([
18+
scrollerPath + 'ui-scroll.js',
19+
scrollerPath + 'ui-scroll-grid.js'
20+
]);
21+
22+
module.exports.compressedFiles = files.concat([
23+
scrollerPath + 'ui-scroll.min.js',
24+
scrollerPath + 'ui-scroll-grid.min.js'
25+
]);
File renamed without changes.

test/datasources.js

Lines changed: 0 additions & 226 deletions
This file was deleted.

test/karma.conf.files.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)