Skip to content

Commit 363d1f1

Browse files
committed
fix: failing archive test due to data type mismatch
1 parent 87ea342 commit 363d1f1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const OCK = {
99
contributors: {
1010
github: {
1111
archive: async function(owner, options){
12-
contributorsLib.archiveContributorsLeaderboard(owner, options)
13-
}
14-
}
12+
return contributorsLib.archiveContributorsLeaderboard(owner, options)
13+
},
14+
},
1515
}
1616
}
1717

test/index.test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ describe('index.js', function() {
1212
describe('#OCK.contributors.github.archive(REPO_OWNER, options);', async function() {
1313
it('should start the task of archiving contributors for REPO_OWNER', async function() {
1414
this.timeout(100000);
15-
let contributorsHandlesString = await OCK.contributors.github.archive(contributorsFixture.VALID_REPO_OWNER);
16-
assert.isNotNull(contributorsHandlesString);
17-
expect(contributorsHandlesString).to.be.not.empty;
18-
expect(contributorsHandlesString).to.include('@');
19-
// expect(str).to.include(',');
15+
let contributorsHandlesArray = await OCK.contributors.github.archive(contributorsFixture.VALID_REPO_OWNER);
16+
assert.isNotNull(contributorsHandlesArray, "No contributors github handles returned");
17+
expect(contributorsHandlesArray).to.be.an('array');
18+
expect(contributorsHandlesArray).to.have.lengthOf.at.least(contributorsFixture.ALL_REPO_CONTRIBUTOR_COUNT);
2019
})
2120
})
2221

0 commit comments

Comments
 (0)