Skip to content

Commit 75f8556

Browse files
authored
Merge pull request #4 from navikt/fix/exports
fix: 🐛 exports Utils.getText as in README example
2 parents 749fdd4 + 23bf2d8 commit 75f8556

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
export * from './parser';
22
export * from './domain';
3-
export * from './rules';
3+
export * from './rules';
4+
5+
import * as Utils from "./utils";
6+
export { Utils }

test/index.test.ts

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import {
2+
Utils,
3+
parse,
4+
build,
5+
ParagraphRule,
6+
HighlightRule,
7+
BoldRule,
8+
LinkRule,
9+
LinebreakRule,
10+
createDynamicHighlightingRule
11+
} from './../src';
12+
13+
describe('index - exports', () => {
14+
it('should export `parse`', () => {
15+
expect(parse).not.toBe(null)
16+
});
17+
18+
it('should export `build`', () => {
19+
expect(build).not.toBe(null)
20+
});
21+
22+
it('should export `LinebreakRule`', () => {
23+
expect(LinebreakRule).not.toBe(null)
24+
});
25+
26+
it('should export `ParagraphRule`', () => {
27+
expect(ParagraphRule).not.toBe(null)
28+
});
29+
30+
it('should export `HighlightRule`', () => {
31+
expect(HighlightRule).not.toBe(null)
32+
});
33+
34+
it('should export `BoldRule`', () => {
35+
expect(BoldRule).not.toBe(null)
36+
});
37+
38+
it('should export `LinkRule`', () => {
39+
expect(LinkRule).not.toBe(null)
40+
});
41+
42+
it('should export `createDynamicHighlightingRule`', () => {
43+
expect(createDynamicHighlightingRule).not.toBe(null)
44+
});
45+
46+
it('should export `Utils.getText()`', () => {
47+
expect(Utils.getText).not.toBe(null)
48+
});
49+
});

0 commit comments

Comments
 (0)