Skip to content

Commit

Permalink
fix(test): add enough sample code to trigger lcov
Browse files Browse the repository at this point in the history
  • Loading branch information
wyvern8 committed Nov 27, 2017
1 parent f789988 commit 7c431cb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/github-task-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ process.on('unhandledRejection', (reason, p) => {
// application specific logging, throwing an error, or other logic here
});

export function placeholder() {
console.log('placeholder');
export function placeholder(test) {
if (test) {
test = test + 'test';
console.log('placeholder');
}
return test;
}
7 changes: 7 additions & 0 deletions src/lib/sample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export class Sample {

test() {
return 'test';
}

}
3 changes: 2 additions & 1 deletion test/github-task-manager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { describe, it } from 'mocha';

describe('GithubTaskManager', function() {
describe('setup', function () {
it('should work', function () {
it('should work', function (done) {
assert.equal(1, 1);
done();
});
});

Expand Down
18 changes: 18 additions & 0 deletions test/lib/sample.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { default as assert } from 'assert';
import { describe, it } from 'mocha';
import { Sample } from '../../src/lib/sample.js';

describe('Sample', function() {
describe('test', function () {
it('should return expected string', function (done) {

let expected = 'test';

let actual = new Sample().test();
assert.equal(actual, expected);
done();

});
});

});

0 comments on commit 7c431cb

Please sign in to comment.