We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 001f896 commit ed84e1cCopy full SHA for ed84e1c
1 file changed
src/util/__tests__/parseApiDocsVersion.test.ts
@@ -0,0 +1,19 @@
1
+import { parseApiDocsVersion } from '../parseApiDocsVersion';
2
+
3
+describe('parseApiDocsVersion', (): void => {
4
+ it('should be defined', (): void => {
5
+ expect(parseApiDocsVersion).toBeDefined();
6
+ });
7
8
+ it(`should return the version when passing string`, (): void => {
9
+ const stringVersion = '1.0';
10
+ expect(parseApiDocsVersion(stringVersion)).toEqual(stringVersion);
11
12
13
+ it(`should return joined version with comma when passing array`, (): void => {
14
+ const arrayVersion = ['1.0', '1.1', '2.4'];
15
+ const expectedJoinedArray = '1.0, 1.1, 2.4';
16
17
+ expect(parseApiDocsVersion(arrayVersion)).toEqual(expectedJoinedArray);
18
19
+});
0 commit comments