-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathblockCTATransitions.test.ts
75 lines (71 loc) · 2.68 KB
/
blockCTATransitions.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { testBlock } from "bingo-stratum-testers";
import { describe, expect, test } from "vitest";
import { blockCTATransitions } from "./blockCTATransitions.js";
import { optionsBase } from "./options.fakes.js";
describe("blockCTATransitions", () => {
test("production", () => {
const creation = testBlock(blockCTATransitions, {
options: optionsBase,
});
expect(creation).toMatchInlineSnapshot(`
{
"addons": [
{
"addons": {
"jobs": [
{
"checkoutWith": {
"fetch-depth": "0",
"ref": "\${{github.event.pull_request.head.ref}}",
"repository": "\${{github.event.pull_request.head.repo.full_name}}",
"token": ""\${{ secrets.ACCESS_TOKEN }}"",
},
"if": "\${{ startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'create-typescript-app') }}",
"name": "CTA Transitions",
"steps": [
{
"run": "pnpx create-typescript-app",
},
{
"uses": "stefanzweifel/git-auto-commit-action@v5",
"with": {
"commit_author": "The Friendly Bingo Bot <[email protected]>",
"commit_message": "Check in changes from re-running npx create-typescript-app",
"commit_user_email": "[email protected]",
"commit_user_name": "The Friendly Bingo Bot",
},
},
{
"uses": "mshick/add-pr-comment@v2",
"with": {
"issue": "\${{ github.event.pull_request.number }}",
"message": "|
🤖 Beep boop! I ran \`npx create-typescript-app\` and found same changes.
Please review the latest commit to see if you want to merge it.
Cheers! 💝
> This change was automatically made in CI to keep your repository up-to-date with the templating in [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).
> If you want to opt out of these automatic updates, delete the \`.github/workflows/cta-transitions.yml\` file on your \`main\` branch.",
"repo-token": "\${{ secrets.ACCESS_TOKEN }}",
},
},
],
},
],
},
"block": [Function],
},
{
"addons": {
"properties": {
"devDependencies": {
"create-typescript-app": "2.7.3",
},
},
},
"block": [Function],
},
],
}
`);
});
});