Skip to content

Commit 26aaee4

Browse files
authored
Merge pull request #108 from leapfrogtechnology/fix-test
Fix parallel strategy test case and release.sh script
2 parents 88da453 + 6ac6175 commit 26aaee4

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

release.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,13 @@ bump() {
4141
}
4242

4343
compare_and_release() {
44-
## Compare the package.json file from two recent commits to master branch and export
44+
## Compare the package.json file from published package to master branch and export
4545
## value to NEXT variable if it differs.
4646

47-
# Get the second last commit from the master branch after merge.
48-
previous_commit_hash=$(git rev-parse @~)
49-
50-
git fetch --all
51-
git checkout ${previous_commit_hash}
52-
53-
old_version=$(cat package.json | jq -r ".version")
47+
old_version=$(npm show @leapfrogtechnology/sync-db version)
5448

5549
printfln "Old package version: ${old_version}"
5650

57-
git checkout master
58-
5951
new_version=$(cat package.json | jq -r ".version")
6052

6153
printfln "New package version: ${new_version}"
@@ -76,7 +68,7 @@ compare_and_release() {
7668
git config --global user.name "Travis CI"
7769

7870
git add CHANGELOG.md
79-
git commit -v --edit -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]"
71+
git commit -v -m "${NEXT} Release :tada: :fireworks: :bell:" -m "[skip ci]"
8072

8173
git remote rm origin
8274
# Add new "origin" with access token in the git URL for authentication

test/unit/service/execution.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ describe('SERVICE: execution', () => {
4646
execution: 'parallel'
4747
} as Configuration);
4848

49-
expect(result).to.deep.equal(['Task A', 'Task B', 'Task C', 'Task D']);
50-
expect(tracker).to.deep.equal(['Task C', 'Task D', 'Task A', 'Task B']);
49+
expect(result).to.include.members(['Task A', 'Task B', 'Task C', 'Task D']);
50+
expect(tracker).to.include.members(['Task C', 'Task D', 'Task A', 'Task B']);
5151
});
5252

5353
it('should throw an error if unknown strategy is provided.', () => {

0 commit comments

Comments
 (0)