Skip to content

Commit dfc13c9

Browse files
committed
✅ deno snapshotの仕様変更に対応
1 parent 2473a00 commit dfc13c9

File tree

3 files changed

+110
-111
lines changed

3 files changed

+110
-111
lines changed
Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,95 @@
11
export const snapshot = {};
22

33
snapshot[`extractCodeFiles 1`] = `
4-
Map {
4+
Map(5) {
55
"main.cpp" => {
6-
blocks: [
7-
{
8-
endId: "63b7b1261280f00000c9bc36",
9-
indent: 2,
10-
lines: [
11-
"#include <iostream>",
12-
"",
13-
],
14-
startId: "63b7b1261280f00000c9bc34",
15-
updated: 1672982822,
16-
},
17-
{
18-
endId: "63b7b1261280f00000c9bc3c",
19-
indent: 2,
20-
lines: [
21-
"int main() {",
22-
' std::cout << "Hello, C++" << "from scrapbox.io" << std::endl;',
23-
"}",
24-
"",
25-
],
26-
startId: "63b7b1261280f00000c9bc38",
27-
updated: 1672982822,
28-
},
29-
],
30-
filename: "main.cpp",
31-
lang: "cpp",
32-
},
6+
blocks: [
7+
{
8+
endId: "63b7b1261280f00000c9bc36",
9+
indent: 2,
10+
lines: [
11+
"#include <iostream>",
12+
"",
13+
],
14+
startId: "63b7b1261280f00000c9bc34",
15+
updated: 1672982822,
16+
},
17+
{
18+
endId: "63b7b1261280f00000c9bc3c",
19+
indent: 2,
20+
lines: [
21+
"int main() {",
22+
' std::cout << "Hello, C++" << "from scrapbox.io" << std::endl;',
23+
"}",
24+
"",
25+
],
26+
startId: "63b7b1261280f00000c9bc38",
27+
updated: 1672982822,
28+
},
29+
],
30+
filename: "main.cpp",
31+
lang: "cpp",
32+
},
3333
"py" => {
34-
blocks: [
35-
{
36-
endId: "63b7b1261280f00000c9bc2a",
37-
indent: 0,
38-
lines: [
39-
'print("Hello World!")',
40-
],
41-
startId: "63b7b1261280f00000c9bc29",
42-
updated: 1672982822,
43-
},
44-
],
45-
filename: "py",
46-
lang: "py",
47-
},
34+
blocks: [
35+
{
36+
endId: "63b7b1261280f00000c9bc2a",
37+
indent: 0,
38+
lines: [
39+
'print("Hello World!")',
40+
],
41+
startId: "63b7b1261280f00000c9bc29",
42+
updated: 1672982822,
43+
},
44+
],
45+
filename: "py",
46+
lang: "py",
47+
},
4848
"python" => {
49-
blocks: [
50-
{
51-
endId: "63b7b1261280f00000c9bc31",
52-
indent: 1,
53-
lines: [
54-
\`console.log("I'm JavaScript");\`,
55-
],
56-
startId: "63b7b1261280f00000c9bc30",
57-
updated: 1672982822,
58-
},
59-
],
60-
filename: "python",
61-
lang: "js",
62-
},
49+
blocks: [
50+
{
51+
endId: "63b7b1261280f00000c9bc31",
52+
indent: 1,
53+
lines: [
54+
\`console.log("I'm JavaScript");\`,
55+
],
56+
startId: "63b7b1261280f00000c9bc30",
57+
updated: 1672982822,
58+
},
59+
],
60+
filename: "python",
61+
lang: "js",
62+
},
6363
"インデント.md" => {
64-
blocks: [
65-
{
66-
endId: "63b7b1261280f00000c9bc2e",
67-
indent: 1,
68-
lines: [
69-
"- インデント",
70-
" - インデント",
71-
],
72-
startId: "63b7b1261280f00000c9bc2c",
73-
updated: 1672982822,
74-
},
75-
],
76-
filename: "インデント.md",
77-
lang: "md",
78-
},
64+
blocks: [
65+
{
66+
endId: "63b7b1261280f00000c9bc2e",
67+
indent: 1,
68+
lines: [
69+
"- インデント",
70+
" - インデント",
71+
],
72+
startId: "63b7b1261280f00000c9bc2c",
73+
updated: 1672982822,
74+
},
75+
],
76+
filename: "インデント.md",
77+
lang: "md",
78+
},
7979
"コードブロック.py" => {
80-
blocks: [
81-
{
82-
endId: "63b7b1261280f00000c9bc27",
83-
indent: 0,
84-
lines: [
85-
'print("Hello World!")',
86-
],
87-
startId: "63b7b1261280f00000c9bc26",
88-
updated: 1672982822,
89-
},
90-
],
91-
filename: "コードブロック.py",
92-
lang: "py",
93-
},
80+
blocks: [
81+
{
82+
endId: "63b7b1261280f00000c9bc27",
83+
indent: 0,
84+
lines: [
85+
'print("Hello World!")',
86+
],
87+
startId: "63b7b1261280f00000c9bc26",
88+
updated: 1672982822,
89+
},
90+
],
91+
filename: "コードブロック.py",
92+
lang: "py",
93+
},
9494
}
9595
`;

parser/__snapshots__/youtube.test.ts.snap

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ snapshot[`youtube links > is 1`] = `
44
{
55
params: URLSearchParams {
66
[Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
7-
[Symbol(list)]: [
8-
[
9-
"v",
10-
"LSvaOcaUQ3Y",
11-
],
12-
],
137
[Symbol("url object")]: URL {
148
hash: "",
159
host: "www.youtube.com",
@@ -23,6 +17,12 @@ snapshot[`youtube links > is 1`] = `
2317
search: "?v=LSvaOcaUQ3Y",
2418
username: "",
2519
},
20+
[Symbol(list)]: [
21+
[
22+
"v",
23+
"LSvaOcaUQ3Y",
24+
],
25+
],
2626
},
2727
pathType: "com",
2828
videoId: "LSvaOcaUQ3Y",
@@ -34,13 +34,13 @@ snapshot[`youtube links > is 2`] = `
3434
listId: "PLmoRDY8IgE2Okxy4WWdP95RHXOTGzJfQs",
3535
params: URLSearchParams {
3636
[Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
37+
[Symbol("url object")]: null,
3738
[Symbol(list)]: [
3839
[
3940
"list",
4041
"PLmoRDY8IgE2Okxy4WWdP95RHXOTGzJfQs",
4142
],
4243
],
43-
[Symbol("url object")]: null,
4444
},
4545
pathType: "list",
4646
}
@@ -50,16 +50,6 @@ snapshot[`youtube links > is 3`] = `
5050
{
5151
params: URLSearchParams {
5252
[Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
53-
[Symbol(list)]: [
54-
[
55-
"v",
56-
"57rdbK4vmKE",
57-
],
58-
[
59-
"list",
60-
"PLmoRDY8IgE2Okxy4WWdP95RHXOTGzJfQs",
61-
],
62-
],
6353
[Symbol("url object")]: URL {
6454
hash: "",
6555
host: "www.youtube.com",
@@ -73,6 +63,16 @@ snapshot[`youtube links > is 3`] = `
7363
search: "?v=57rdbK4vmKE&list=PLmoRDY8IgE2Okxy4WWdP95RHXOTGzJfQs",
7464
username: "",
7565
},
66+
[Symbol(list)]: [
67+
[
68+
"v",
69+
"57rdbK4vmKE",
70+
],
71+
[
72+
"list",
73+
"PLmoRDY8IgE2Okxy4WWdP95RHXOTGzJfQs",
74+
],
75+
],
7676
},
7777
pathType: "com",
7878
videoId: "57rdbK4vmKE",
@@ -83,12 +83,6 @@ snapshot[`youtube links > is 4`] = `
8383
{
8484
params: URLSearchParams {
8585
[Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
86-
[Symbol(list)]: [
87-
[
88-
"v",
89-
"nj1cre2e6t0",
90-
],
91-
],
9286
[Symbol("url object")]: URL {
9387
hash: "",
9488
host: "music.youtube.com",
@@ -102,6 +96,12 @@ snapshot[`youtube links > is 4`] = `
10296
search: "?v=nj1cre2e6t0",
10397
username: "",
10498
},
99+
[Symbol(list)]: [
100+
[
101+
"v",
102+
"nj1cre2e6t0",
103+
],
104+
],
105105
},
106106
pathType: "com",
107107
videoId: "nj1cre2e6t0",
@@ -112,9 +112,8 @@ snapshot[`youtube links > is 5`] = `
112112
{
113113
params: URLSearchParams {
114114
[Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
115-
[Symbol(list)]: [
116-
],
117115
[Symbol("url object")]: null,
116+
[Symbol(list)]: [],
118117
},
119118
pathType: "dotbe",
120119
videoId: "nj1cre2e6t0",

rest/__snapshots__/pages.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Request {
66
headers: Headers {},
77
method: "GET",
88
redirect: "follow",
9-
url: "https://scrapbox.io/api/pages/takker/%E3%83%86%E3%82%B9%E3%83%88%E3%83%9A%E3%83%BC%E3%82%B8?followRe..."
9+
url: "https://scrapbox.io/api/pages/takker/%E3%83%86%E3%82%B9%E3%83%88%E3%83%9A%E3%83%BC%E3%82%B8?followRe"... 9 more characters
1010
}
1111
`;
1212

0 commit comments

Comments
 (0)