Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pre-release-database-cdb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
pre-release-database-cdb
Commits
981e1d06
Commit
981e1d06
authored
Feb 06, 2026
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow yrp subdir
parent
2d0e8878
Pipeline
#42895
passed with stages
in 2 minutes and 23 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
tests/tools/freeze-yrp.ts
tests/tools/freeze-yrp.ts
+4
-2
tests/yrp.spec.ts
tests/yrp.spec.ts
+24
-8
No files found.
tests/tools/freeze-yrp.ts
View file @
981e1d06
...
...
@@ -11,18 +11,20 @@ async function main() {
process
.
exit
(
1
);
}
for
(
const
yrpFilename
of
yrpFilenames
)
{
const
yrpParts
=
yrpFilename
.
split
(
"
/
"
).
filter
((
part
)
=>
part
.
length
>
0
);
const
fullPath
=
path
.
resolve
(
process
.
cwd
(),
"
tests
"
,
"
yrp
"
,
`
${
yrpFilename
}
.yrp`
,
path
.
join
(...
yrpParts
)
+
"
.yrp
"
,
);
const
destPath
=
path
.
resolve
(
process
.
cwd
(),
"
tests
"
,
"
yrp-info
"
,
`
${
yrpFilename
}
.yaml`
,
path
.
join
(...
yrpParts
)
+
"
.yaml
"
,
);
await
fs
.
promises
.
mkdir
(
path
.
dirname
(
destPath
),
{
recursive
:
true
});
console
.
log
(
`Will save YRP info from
${
fullPath
}
to
${
destPath
}
`
);
await
createTest
({
yrp
:
fullPath
},
async
(
test
)
=>
{
const
info
=
toYrpInfo
(
test
);
...
...
tests/yrp.spec.ts
View file @
981e1d06
...
...
@@ -7,22 +7,38 @@ import fs from "node:fs";
describe
(
"
YRP
"
,
()
=>
{
const
yrpDirPath
=
path
.
resolve
(
process
.
cwd
(),
"
tests
"
,
"
yrp
"
);
const
yrpDir
=
readdirSync
(
yrpDirPath
);
for
(
const
yrpFilename
of
yrpDir
)
{
if
(
!
yrpFilename
.
endsWith
(
"
.yrp
"
))
continue
;
const
testName
=
`YRP:
${
yrpFilename
}
`
;
const
listYrpFiles
=
(
dirPath
:
string
,
basePath
:
string
):
string
[]
=>
{
const
entries
=
readdirSync
(
dirPath
,
{
withFileTypes
:
true
});
const
results
:
string
[]
=
[];
for
(
const
entry
of
entries
)
{
const
entryPath
=
path
.
join
(
dirPath
,
entry
.
name
);
if
(
entry
.
isDirectory
())
{
results
.
push
(...
listYrpFiles
(
entryPath
,
basePath
));
continue
;
}
if
(
entry
.
isFile
()
&&
entry
.
name
.
endsWith
(
"
.yrp
"
))
{
results
.
push
(
path
.
relative
(
basePath
,
entryPath
));
}
}
return
results
;
};
const
yrpFiles
=
listYrpFiles
(
yrpDirPath
,
yrpDirPath
).
sort
();
for
(
const
yrpRelativePath
of
yrpFiles
)
{
const
testName
=
`YRP:
${
yrpRelativePath
}
`
;
it
(
testName
,
async
()
=>
{
const
yrpPath
=
path
.
resolve
(
yrpDirPath
,
yrp
Filename
);
const
yrpPath
=
path
.
resolve
(
yrpDirPath
,
yrp
RelativePath
);
await
createTest
({
yrp
:
yrpPath
},
async
(
test
)
=>
{
const
yrpInfoPath
=
path
.
resolve
(
__dirname
,
process
.
cwd
(),
"
tests
"
,
"
yrp-info
"
,
yrp
Filename
.
slice
(
0
,
-
4
)
+
"
.yaml
"
,
yrp
RelativePath
.
replace
(
/
\.
yrp$/i
,
"
.yaml
"
)
,
);
const
currentInfo
=
toYrpInfo
(
test
);
const
hasYrpInfo
=
existsSync
(
yrpInfoPath
);
console
.
log
(
`Testing YRP:
${
yrp
Filename
}
\nYRP info yaml:
${
hasYrpInfo
?
"
available
"
:
"
none
"
}
\n
${
currentInfo
.
snapshotText
}
`
,
`Testing YRP:
${
yrp
RelativePath
}
\nYRP info yaml:
${
hasYrpInfo
?
"
available
"
:
"
none
"
}
\n
${
currentInfo
.
snapshotText
}
`
,
);
if
(
hasYrpInfo
)
{
// do further tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment