Skip to content

Commit

Permalink
Skip only known or hidden files. (#498)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Aug 12, 2024
1 parent 08bbc0e commit 2ee3104
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tools/src/tester/TestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ export default class TestRunner {
#collect_story_files (folder: string, file: string, prefix: string): StoryFile[] {
const path = file === '' ? folder : `${folder}/${file}`
const next_prefix = prefix === '' ? file : `${prefix}/${file}`
if (fs.statSync(path).isFile()) {
if (!path.endsWith('.yaml')) {
return []
}
if (file.startsWith('.') || file == 'docker-compose.yml') {
return []
} else if (fs.statSync(path).isFile()) {
const story: Story = read_yaml(path)
return [{
display_path: next_prefix === '' ? basename(path) : next_prefix,
Expand Down
1 change: 1 addition & 0 deletions tools/tests/tester/fixtures/stories/.ignore-dot-file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hidden file, ignored.
1 change: 1 addition & 0 deletions tools/tests/tester/fixtures/stories/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# A docker-compose.yml file, ignored.
1 change: 0 additions & 1 deletion tools/tests/tester/fixtures/stories/ignore.wrong.extension

This file was deleted.

0 comments on commit 2ee3104

Please sign in to comment.