Skip to content

Commit

Permalink
test(jobs): adapt the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hulkoba authored and Realtin committed Jul 4, 2019
1 parent a98e709 commit 41984f4
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 128 deletions.
2 changes: 1 addition & 1 deletion jobs/create-group-version-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ module.exports = async function (
const dependencyLink = getFormattedDependencyURL({ repositoryURL: transforms[0].repoURL })

const license = versions[version].license
const licenseHasChanged = versions[oldVersionResolved].license !== license
const licenseHasChanged = oldVersionResolved ? versions[oldVersionResolved].license !== license : false
const publisher = versions[version]['_npmUser'].name

// maybe adapt PR body
Expand Down
60 changes: 45 additions & 15 deletions test/jobs/__snapshots__/create-group-version-branch.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Object {
"body": "
## There have been updates to the *pouchdb* monorepo:
- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb-adapter-utils](https://www.npmjs.com/package/pouchdb-adapter-utils) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`devDependency\` [pouchdb-core](https://www.npmjs.com/package/pouchdb-core) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb-adapter-utils](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`devDependency\` [pouchdb-core](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
These versions are **not covered** by your **current version range**.
Expand All @@ -18,7 +18,12 @@ This monorepo update includes releases of one or more dependencies which all bel
---
[Find out more about this release]().
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/dep/dep).
<details>
<summary>FAQ and help</summary>
Expand All @@ -43,7 +48,7 @@ Object {
"body": "
## There have been updates to the *pouchdb* monorepo:
- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
These versions are **not covered** by your **current version range**.
Expand All @@ -53,7 +58,12 @@ This monorepo update includes releases of one or more dependencies which all bel
---
[Find out more about this release]().
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/dep/dep).
<details>
<summary>FAQ and help</summary>
Expand All @@ -78,9 +88,9 @@ Object {
"body": "
## There have been updates to the *pouchdb* monorepo:
- The \`dependency\` [pouchdb](https://www.npmjs.com/package/pouchdb) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb-adapter-utils](https://www.npmjs.com/package/pouchdb-adapter-utils) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`devDependency\` [pouchdb-browser](https://www.npmjs.com/package/pouchdb-browser) was updated from \`1.0.0\` to \`1.8.0\`.
- The \`dependency\` [pouchdb](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [pouchdb-adapter-utils](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`devDependency\` [pouchdb-browser](https://github.com/dep/dep) was updated from \`1.0.0\` to \`1.8.0\`.
These versions are **not covered** by your **current version range**.
Expand All @@ -90,7 +100,12 @@ This monorepo update includes releases of one or more dependencies which all bel
---
[Find out more about this release]().
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/dep/dep).
<details>
<summary>FAQ and help</summary>
Expand All @@ -115,7 +130,7 @@ Object {
"body": "
## There have been updates to the *react* monorepo:
- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
These versions are **not covered** by your **current version range**.
Expand All @@ -125,7 +140,12 @@ This monorepo update includes releases of one or more dependencies which all bel
---
[Find out more about this release]().
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/dep/dep).
<details>
<summary>FAQ and help</summary>
Expand All @@ -150,7 +170,7 @@ Object {
"body": "
## There have been updates to the *react* monorepo:
- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`.
- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
These versions are **not covered** by your **current version range**.
Expand All @@ -160,7 +180,12 @@ This monorepo update includes releases of one or more dependencies which all bel
---
[Find out more about this release]().
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/dep/dep).
<details>
<summary>FAQ and help</summary>
Expand All @@ -186,7 +211,7 @@ Array [
`;
exports[`create-group-version-branch no new pull request, but new comment on PR, 1 group, 2 packages, same dependencyType, old PR exists 1`] = `
"- The \`dependency\` [react](https://www.npmjs.com/package/react) was updated from \`1.0.0\` to \`2.0.0\`.
"- The \`dependency\` [react](https://github.com/dep/dep) was updated from \`1.0.0\` to \`2.0.0\`.
[Update to these versions instead 🚀](https://github.com/hans/monorepo/compare/master...hans:greenkeeper%2Fdefault%2Fmonorepo.react-20190330170013)"
`;
Expand All @@ -210,6 +235,11 @@ If you don’t accept this pull request, your project will work just like it did
---
publisher: finn
license: MIT
---
[Find out more about this release]().
<details>
Expand Down
40 changes: 40 additions & 0 deletions test/jobs/__snapshots__/create-version-branch.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ This monorepo update includes releases of one or more dependencies which all bel
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/orgname/colors).
<details>
Expand Down Expand Up @@ -91,6 +96,11 @@ This monorepo update includes releases of one or more dependencies which all bel
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/orgname/flowers).
<details>
Expand Down Expand Up @@ -121,6 +131,11 @@ This monorepo update includes releases of one or more dependencies which all bel
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/orgname/colors).
<details>
Expand Down Expand Up @@ -153,6 +168,11 @@ This monorepo update includes releases of one or more dependencies which all bel
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/jest/jest).
<details>
Expand Down Expand Up @@ -180,6 +200,11 @@ If you don’t accept this pull request, your project will work just like it did
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/best/best).
<details>
Expand All @@ -205,6 +230,11 @@ If you don’t accept this pull request, your project will work just like it did
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/finnpauls/dep).
<details>
Expand All @@ -230,6 +260,11 @@ If you don’t accept this pull request, your project will work just like it did
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/finnpauls/dep).
<details>
Expand All @@ -255,6 +290,11 @@ If you don’t accept this pull request, your project will work just like it did
---
publisher: finn
license: MIT
---
[Find out more about this release](https://github.com/finnpauls/dep).
<details>
Expand Down
Loading

0 comments on commit 41984f4

Please sign in to comment.