Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
roboshoes committed Nov 8, 2019
1 parent f659f52 commit 0771418
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
"type": "git",
"url": "git://github.com/mout/mout.git"
},
"version": "1.2.1"
"version": "1.2.2"
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mout",
"description": "Modular Utilities",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "http://moutjs.com/",
"author": "Miller Medeiros <[email protected]> (http://blog.millermedeiros.com)",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**@license
* mout v1.1.1 | http://moutjs.com | MIT license
* mout v1.2.2 | http://moutjs.com | MIT license
*/
define(function(require){

//automatically generated, do not edit!
//run `node build` instead
return {
'VERSION' : '1.1.1',
'VERSION' : '1.2.2',
'array' : require('./array'),
'collection' : require('./collection'),
'date' : require('./date'),
Expand Down
56 changes: 30 additions & 26 deletions tests/spec/array/spec-repeat.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
define(['mout/array/repeat'], function (repeat) {

describe('array/repeat()', function(){
describe('array/repeat()', function () {

it('should create an array of size 0.', function(){
expect(repeat(0, 'a')).toEqual([]);
});
it('should create an array of size 0.', function () {
expect( repeat(0, 'a') ).toEqual([]);
});

it('should create an array of size 1 and fill with null.', function(){
expect(repeat(1, null)).toEqual([null]);
});

it('should create an array of size 1 and fill with a value "a".', function(){
expect(repeat(1, 'a')).toEqual(['a']);
});
it('should create an array of size 1 and fill with null.', function () {
expect( repeat(1, null) ).toEqual([null]);
});

it('should create an array of size N and fill with a value "a".', function(){
expect(repeat(2, 'a')).toEqual(['a', 'a']);
});
it('should create an array of size 1 and fill with a value "a".', function () {
expect( repeat(1, 'a') ).toEqual(['a']);
});

it('should create an array of size N and fill with values "albatros".', function(){
expect(repeat(2, 'albatros')).toEqual(['albatros', 'albatros']);
});
it('should create an array of size N and fill with a value "a".', function () {
expect( repeat(2, 'a') ).toEqual(['a', 'a']);
});

it('should create an array of size N and fill with a number 1.', function(){
expect(repeat(2, 1)).toEqual([1, 1]);
});
it('should create an array of size N and fill with array.', function () {
expect( repeat(5, 'abc') ).toEqual(['abc', 'abc', 'abc', 'abc', 'abc']);
});

it('should create an array of size N and fill with array.', function(){
expect(repeat(2, [1])).toEqual([[1], [1]]);
});
it('should create an array of size N and fill with values "albatros".', function () {
expect( repeat(2, 'albatros') ).toEqual(['albatros', 'albatros']);
});

it('should create an array of size N and fill with a number 1.', function () {
expect( repeat(2, 1) ).toEqual([1, 1]);
});

it('should create an array of size N and fill with array.', function () {
expect( repeat(2, [1]) ).toEqual([[1], [1]]);
});

it('should throw an exception in case the of a negative number.', function(){
expect(() => repeat(-1, null)).toThrow();
it('should throw an exception in case the of a negative number.', function () {
expect( function () { repeat(-1, null) } ).toThrow();
});
});
});
});

0 comments on commit 0771418

Please sign in to comment.