Skip to content

Commit

Permalink
npm run cover w/100%
Browse files Browse the repository at this point in the history
  • Loading branch information
hsk81 committed Jul 18, 2018
1 parent 6d18a2f commit 9faacaa
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
8 changes: 8 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import "./String";
/**
* Returns a random string for the provided length and range.
*
* @param length of returned string in [0..8]
* @param range of characters in [2..36]
*
* @returns a random string
*/
export declare function random(length?: number, range?: number): string;
export default random;
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

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

14 changes: 11 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

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

8 changes: 8 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import "./String";

/**
* Returns a random string for the provided length and range.
*
* @param length of returned string in [0..8]
* @param range of characters in [2..36]
*
* @returns a random string
*/
export function random(length: number = 0, range: number = 36): string {
return String.random(length, range);
}
Expand Down
2 changes: 2 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ describe('index.random', () => {
describe('index.random', () => {
it('should return a string', () => {
expect(index.random()).to.be.a('string');
expect(String.random()).to.be.a('string');
});
it('should return a default empty string', () => {
expect(index.random()).to.equal('');
expect(String.random()).to.equal('');
});
});

Expand Down

0 comments on commit 9faacaa

Please sign in to comment.