diff --git a/tools/src/tester/TestRunner.ts b/tools/src/tester/TestRunner.ts index 0c0f3c4ff..0b197d648 100644 --- a/tools/src/tester/TestRunner.ts +++ b/tools/src/tester/TestRunner.ts @@ -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, diff --git a/tools/tests/tester/fixtures/stories/.ignore-dot-file b/tools/tests/tester/fixtures/stories/.ignore-dot-file new file mode 100644 index 000000000..11c2f4cfd --- /dev/null +++ b/tools/tests/tester/fixtures/stories/.ignore-dot-file @@ -0,0 +1 @@ +Hidden file, ignored. \ No newline at end of file diff --git a/tools/tests/tester/fixtures/stories/docker-compose.yml b/tools/tests/tester/fixtures/stories/docker-compose.yml new file mode 100644 index 000000000..a47276c99 --- /dev/null +++ b/tools/tests/tester/fixtures/stories/docker-compose.yml @@ -0,0 +1 @@ +# A docker-compose.yml file, ignored. diff --git a/tools/tests/tester/fixtures/stories/ignore.wrong.extension b/tools/tests/tester/fixtures/stories/ignore.wrong.extension deleted file mode 100644 index a649676ae..000000000 --- a/tools/tests/tester/fixtures/stories/ignore.wrong.extension +++ /dev/null @@ -1 +0,0 @@ -Not a .yaml file, should be ignored