Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko committed Nov 26, 2020
1 parent f654aac commit 87a49f7
Show file tree
Hide file tree
Showing 6 changed files with 640 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/_tests/fixtures/49639/_downloads.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"jasmine": 7855902
}
6 changes: 6 additions & 0 deletions src/_tests/fixtures/49639/_files.json

Large diffs are not rendered by default.

463 changes: 463 additions & 0 deletions src/_tests/fixtures/49639/_response.json

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions src/_tests/fixtures/49639/derived.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"type": "info",
"now": "2020-11-26T15:09:52.097Z",
"pr_number": 49639,
"author": "ienzam",
"headCommitAbbrOid": "c5e5c98",
"headCommitOid": "c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856",
"lastPushDate": "2020-11-17T22:12:35.000Z",
"lastActivityDate": "2020-11-19T16:12:15.000Z",
"maintainerBlessed": false,
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "jasmine",
"kind": "edit",
"files": [
{
"path": "types/jasmine/index.d.ts",
"kind": "definition"
},
{
"path": "types/jasmine/tslint.json",
"kind": "package-meta",
"suspect": "not the required form and not moving towards it",
"suggestion": {
"startLine": 4,
"line": 4,
"suggestion": ""
}
}
],
"owners": [
"borisyankov",
"theodorejb",
"davidparsson",
"gmoothart",
"lukas-zech-software",
"Engineer2B",
"cyungmann",
"Roaders",
"devoto13",
"fdim",
"kolodny",
"stephenfarrar",
"zvirja",
"djungowski",
"chivesrs",
"kirjs",
"ienzam"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "sandersn",
"date": "2020-11-19T16:12:15.000Z",
"isMaintainer": false
},
{
"type": "approved",
"reviewer": "chivesrs",
"date": "2020-11-18T01:47:38.000Z",
"isMaintainer": false
}
],
"ciResult": "pass"
}
64 changes: 64 additions & 0 deletions src/_tests/fixtures/49639/mutations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[
{
"query": "mutation($input: AddLabelsToLabelableInput!) { addLabelsToLabelable(input: $input) { clientMutationId } }",
"variables": {
"input": {
"labelIds": [
"MDU6TGFiZWw1ODYxNzcwNjM="
],
"labelableId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx"
}
}
},
{
"query": "mutation($input: RemoveLabelsFromLabelableInput!) { removeLabelsFromLabelable(input: $input) { clientMutationId } }",
"variables": {
"input": {
"labelIds": [
"MDU6TGFiZWwxNjA4NTUyNDEw",
"MDU6TGFiZWw2OTcwMTg5NzI="
],
"labelableId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx"
}
}
},
{
"query": "mutation($input: AddProjectCardInput!) { addProjectCard(input: $input) { clientMutationId } }",
"variables": {
"input": {
"contentId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx",
"projectColumnId": "MDEzOlByb2plY3RDb2x1bW43NTUyOTIy"
}
}
},
{
"query": "mutation($input: UpdateIssueCommentInput!) { updateIssueComment(input: $input) { clientMutationId } }",
"variables": {
"input": {
"id": "MDEyOklzc3VlQ29tbWVudDcyOTI0NjE3Mw==",
"body": "@ienzam Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\nThis PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered [adding tests](https://github.com/DefinitelyTyped/DefinitelyTyped#editing-tests-on-an-existing-package) to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.\n\n## 1 package in this PR\n\n* `jasmine` [on npm](https://www.npmjs.com/package/jasmine), [on unpkg](https://unpkg.com/browse/jasmine@latest/) (author is owner)\n - owner-approval: @chivesrs\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ❌ A DT maintainer needs to approve changes which affect module config files\n - [`jasmine/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-0a3e03c56e43fc53245f1e4296782b62788ba4c9e70c9439d22b1998e681f55e): not the required form and not moving towards it\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ...\n<!--typescript_bot_welcome-->"
}
}
},
{
"query": "mutation($input: AddPullRequestReviewThreadInput!) { addPullRequestReviewThread(input: $input) { clientMutationId } }",
"variables": {
"input": {
"pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx",
"path": "types/jasmine/tslint.json",
"line": 4,
"body": "```suggestion\n"
}
}
},
{
"query": "mutation($input: SubmitPullRequestReviewInput!) { submitPullRequestReview(input: $input) { clientMutationId } }",
"variables": {
"input": {
"pullRequestId": "MDExOlB1bGxSZXF1ZXN0NTIyNzM5MjUx",
"body": "@ienzam I noticed these differences from the required form. If you can revise your changes to avoid them, so much the better! Otherwise please reply with explanations why they're needed (unless it's obvious) and a maintainer will take a look. Thanks!\n<!--typescript_bot_suggestions-->",
"event": "COMMENT"
}
}
}
]
31 changes: 31 additions & 0 deletions src/_tests/fixtures/49639/result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"pr_number": 49639,
"targetColumn": "Needs Maintainer Review",
"labels": [
"Critical package",
"Other Approved",
"Owner Approved",
"Author is Owner",
"Config Edit",
"Untested Change"
],
"responseComments": [
{
"tag": "welcome",
"status": "@ienzam Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\nThis PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Have you considered [adding tests](https://github.com/DefinitelyTyped/DefinitelyTyped#editing-tests-on-an-existing-package) to cover the change you're making? Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you.\n\n## 1 package in this PR\n\n* `jasmine` [on npm](https://www.npmjs.com/package/jasmine), [on unpkg](https://unpkg.com/browse/jasmine@latest/) (author is owner)\n - owner-approval: @chivesrs\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * ❌ A DT maintainer needs to approve changes which affect module config files\n - [`jasmine/tslint.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49639/files/c5e5c9885d23e7d1c1ea8f54b53c8283d5f4f856#diff-0a3e03c56e43fc53245f1e4296782b62788ba4c9e70c9439d22b1998e681f55e): not the required form and not moving towards it\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
}
],
"suggestions": {
"types/jasmine/tslint.json": {
"startLine": 4,
"line": 4,
"suggestion": ""
}
},
"shouldClose": false,
"shouldMerge": false,
"shouldUpdateLabels": true,
"shouldUpdateProjectColumn": true,
"shouldRemoveFromActiveColumns": false,
"isReadyForAutoMerge": false
}

0 comments on commit 87a49f7

Please sign in to comment.