Rename configExists to configIsTemporary

Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
Andre Wanlin
2023-01-25 12:58:28 -06:00
committed by Renan Mendes Carvalho
parent 8e11504ce3
commit c2bba4affe
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ export const getMkdocsYml: (
) => Promise<{
path: string;
content: string;
configExists: boolean;
configIsTemporary: boolean;
}>;
// @public
@@ -529,12 +529,12 @@ describe('helpers', () => {
const {
path: mkdocsPath,
content,
configExists,
configIsTemporary,
} = await getMkdocsYml(inputDir, siteOptions);
expect(mkdocsPath).toBe(key);
expect(content).toBe(mkdocsYml.toString());
expect(configExists).toBe(true);
expect(configIsTemporary).toBe(false);
});
it('returns expected contents when .yaml file is present', async () => {
@@ -543,11 +543,11 @@ describe('helpers', () => {
const {
path: mkdocsPath,
content,
configExists,
configIsTemporary,
} = await getMkdocsYml(inputDir, siteOptions);
expect(mkdocsPath).toBe(key);
expect(content).toBe(mkdocsYml.toString());
expect(configExists).toBe(true);
expect(configIsTemporary).toBe(false);
});
it('returns expected contents when default file is present', async () => {
@@ -561,12 +561,12 @@ describe('helpers', () => {
const {
path: mkdocsPath,
content,
configExists,
configIsTemporary,
} = await getMkdocsYml(inputDir, defaultSiteOptions);
expect(mkdocsPath).toBe(key);
expect(content).toBe(mkdocsDefaultYml.toString());
expect(configExists).toBe(false);
expect(configIsTemporary).toBe(true);
});
it('throws when neither .yml nor .yaml nor default file is present', async () => {
@@ -196,7 +196,7 @@ export const generateMkdocsYml = async (
export const getMkdocsYml = async (
inputDir: string,
siteOptions?: { name?: string },
): Promise<{ path: string; content: string; configExists: boolean }> => {
): Promise<{ path: string; content: string; configIsTemporary: boolean }> => {
let mkdocsYmlPath: string;
let mkdocsYmlFileString: string;
try {
@@ -206,7 +206,7 @@ export const getMkdocsYml = async (
return {
path: mkdocsYmlPath,
content: mkdocsYmlFileString,
configExists: true,
configIsTemporary: false,
};
}
@@ -216,7 +216,7 @@ export const getMkdocsYml = async (
return {
path: mkdocsYmlPath,
content: mkdocsYmlFileString,
configExists: true,
configIsTemporary: false,
};
}
@@ -233,7 +233,7 @@ export const getMkdocsYml = async (
return {
path: mkdocsYmlPath,
content: mkdocsYmlFileString,
configExists: false,
configIsTemporary: true,
};
};