Skip to content

Commit

Permalink
Export hasChordContents function (#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnversluis authored Nov 14, 2023
1 parent 08ce4cb commit b05b207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/template_helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ChordLyricsPair from './chord_sheet/chord_lyrics_pair';
import Tag from './chord_sheet/tag';
import { INDETERMINATE, NONE } from './constants';
import { isEmptyString, isEvaluatable } from './utilities';
import { hasChordContents, isEmptyString, isEvaluatable } from './utilities';
import Item from './chord_sheet/item';
import Line from './chord_sheet/line';
import Paragraph from './chord_sheet/paragraph';
Expand All @@ -19,7 +19,7 @@ interface WhenCallback {
(): string;
}

export { isEvaluatable } from './utilities';
export { hasChordContents, isEvaluatable } from './utilities';
export { renderChord } from './helpers';

export const isChordLyricsPair = (item: Item): boolean => item instanceof ChordLyricsPair;
Expand Down Expand Up @@ -99,4 +99,5 @@ export default {
evaluate,
fontStyleTag,
renderChord,
hasChordContents,
};
2 changes: 2 additions & 0 deletions test/exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const {
evaluate,
fontStyleTag,
renderChord,
hasChordContents,
} = templateHelpers;

describe('exports', () => {
Expand Down Expand Up @@ -99,6 +100,7 @@ describe('exports', () => {
expect(evaluate).toBeDefined();
expect(fontStyleTag).toBeDefined();
expect(renderChord).toBeDefined();
expect(hasChordContents).toBeDefined();
});

it('supplies all constants as properties of the default export', () => {
Expand Down

0 comments on commit b05b207

Please sign in to comment.