diff --git a/plugins/techdocs-node/src/stages/generate/__fixtures__/mkdocs_with_env_tag.yml b/plugins/techdocs-node/src/stages/generate/__fixtures__/mkdocs_with_env_tag.yml new file mode 100644 index 0000000000..8da1ef0cca --- /dev/null +++ b/plugins/techdocs-node/src/stages/generate/__fixtures__/mkdocs_with_env_tag.yml @@ -0,0 +1 @@ +site_name: !ENV [SITE_NAME, OTHER_NAME, 'My default site name'] \ No newline at end of file diff --git a/plugins/techdocs-node/src/stages/generate/helpers.test.ts b/plugins/techdocs-node/src/stages/generate/helpers.test.ts index 7590df94fb..f45f6034ec 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.test.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.test.ts @@ -78,6 +78,9 @@ const mkdocsYmlWithoutPlugins = fs.readFileSync( const mkdocsYmlWithAdditionalPlugins = fs.readFileSync( resolvePath(__filename, '../__fixtures__/mkdocs_with_additional_plugins.yml'), ); +const mkdocsYmlWithEnvTag = fs.readFileSync( + resolvePath(__filename, '../__fixtures__/mkdocs_with_env_tag.yml'), +); const mockLogger = getVoidLogger(); const warn = jest.spyOn(mockLogger, 'warn'); @@ -582,10 +585,16 @@ describe('helpers', () => { ).rejects.toThrow(); }); - it('should validate files with custom yaml tags', async () => { + it('should validate files with custom yaml tags (scalar)', async () => { await expect( validateMkdocsYaml(inputDir, mkdocsYmlWithExtensions.toString()), ).resolves.toBeUndefined(); }); + + it('should validate files with custom yaml tags (sequence)', async () => { + await expect( + validateMkdocsYaml(inputDir, mkdocsYmlWithEnvTag.toString()), + ).resolves.toBeUndefined(); + }); }); });