Skip to content

Commit 08e5761

Browse files
author
Philipp Alferov
committed
Test dependencies
1 parent b72a017 commit 08e5761

File tree

4 files changed

+50
-2
lines changed

4 files changed

+50
-2
lines changed

test/angular-file-saver-bundle.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ describe('angular-file-saver', function() {
1111
angular.mock.inject(function(_FileSaver_) {
1212
FileSaver = _FileSaver_;
1313
});
14-
1514
});
1615

1716
describe('passed arguments are correct', function() {

test/blob-bundle.spec.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use strict';
2+
3+
describe('blob', function() {
4+
5+
var Blob, oMyBlob;
6+
7+
beforeEach(function() {
8+
9+
angular.mock.module('ngFileSaver');
10+
11+
angular.mock.inject(function(_Blob_) {
12+
Blob = _Blob_;
13+
});
14+
});
15+
16+
it('should exist', function() {
17+
expect(Blob).toBeDefined();
18+
});
19+
20+
it('should create valid blob instances', function() {
21+
var text = ['Hello'];
22+
oMyBlob = new Blob(text, { type: 'text/html' });
23+
expect(oMyBlob).toEqual(jasmine.any(Blob));
24+
});
25+
26+
});

test/file-saver-bundle.spec.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
3+
describe('file-saver', function() {
4+
5+
var SaveAs;
6+
7+
beforeEach(function() {
8+
9+
angular.mock.module('ngFileSaver');
10+
11+
angular.mock.inject(function(_SaveAs_) {
12+
SaveAs = _SaveAs_;
13+
});
14+
});
15+
16+
it('should exist', function() {
17+
expect(SaveAs).toBeDefined();
18+
});
19+
20+
it('should be a function', function() {
21+
expect(SaveAs).toEqual(jasmine.any(Function));
22+
});
23+
});

test/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = function(config) {
2525
'./node_modules/angular-mocks/angular-mocks.js',
2626
'src/angular-file-saver-bundle.module.js',
2727
// Test files
28-
'test/**/*.js'
28+
'test/**/*.spec.js'
2929
]
3030
});
3131
};

0 commit comments

Comments
 (0)