Skip to content

Commit

Permalink
Removing ts ignore, correcting test names
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Vedder committed Apr 19, 2022
1 parent 8dfca9e commit 678eb06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/context/yaml/handlers/branding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ type ParsedBranding = {

async function parse(context: YAMLContext): Promise<ParsedBranding> {
// Load the HTML file for each page
//@ts-ignore
if (!context.assets.branding) return { branding: undefined };
if (!context.assets.branding)
return {
branding: {
templates: [],
},
};

const {
branding: { templates, ...branding },
Expand Down
4 changes: 2 additions & 2 deletions test/context/directory/branding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const brandingSettings = JSON.stringify({
});

describe('#directory context branding', () => {
it('should process templates', async () => {
it('should process branding settings, including templates', async () => {
const dir = path.join(testDataDir, 'directory', 'branding-process');
cleanThenMkdir(dir);
const brandingDir = path.join(dir, constants.BRANDING_DIRECTORY);
Expand Down Expand Up @@ -50,7 +50,7 @@ describe('#directory context branding', () => {
]);
});

it('should dump templates', async () => {
it('should dump branding settings, including templates', async () => {
const repoDir = path.join(testDataDir, 'directory', 'branding-dump');
cleanThenMkdir(repoDir);
const context = new Context({ AUTH0_INPUT_FILE: repoDir }, mockMgmtClient());
Expand Down
4 changes: 2 additions & 2 deletions test/context/yaml/branding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const html = '<html>##foo##</html>';
const htmlTransformed = '<html>bar</html>';

describe('#YAML context branding templates', () => {
it('should process branding templates', async () => {
it('should process branding settings, including templates', async () => {
const dir = path.join(testDataDir, 'yaml', 'branding-process');
cleanThenMkdir(dir);

Expand Down Expand Up @@ -39,7 +39,7 @@ describe('#YAML context branding templates', () => {
]);
});

it('should dump branding templates', async () => {
it('should dump branding settings, including templates', async () => {
const dir = path.join(testDataDir, 'yaml', 'branding-dump');
cleanThenMkdir(dir);
const context = new Context(
Expand Down

0 comments on commit 678eb06

Please sign in to comment.