-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more tests for documentation generation
- Loading branch information
Showing
51 changed files
with
141 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mentation/markdown/fixtures/getContext.js → test/documentation/fixtures/getContext.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ixtures/projects/complex/docs/Settings.md → ...ixtures/projects/complex/docs/Settings.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Settings for `complex` | ||
|
||
## Group | ||
|
||
| Name | Description | Path | CLI option | Default | Type | Required | Can be empty | Extensions | | ||
| ------ | ----------- | ------------ | -------------- | ------- | --------- | -------- | ------------ | --------------------------- | | ||
| value2 | | group.value2 | --group-value2 | `false` | `Unknown` | No | Yes | roc-package-b, roc-plugin-b | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../fixtures/projects/empty/docs/Settings.md → .../fixtures/projects/empty/docs/Settings.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Settings for `empty` | ||
|
||
## Group | ||
|
||
| Name | Description | Path | CLI option | Default | Type | Required | Can be empty | Extensions | | ||
| ------ | ----------- | ------------ | -------------- | ------- | --------- | -------- | ------------ | --------------------------- | | ||
| value2 | | group.value2 | --group-value2 | `false` | `Unknown` | No | Yes | roc-package-b, roc-plugin-b | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import expect from 'expect'; | ||
|
||
import addPadding from '../../../src/documentation/helpers/addPadding'; | ||
|
||
describe('documentation', () => { | ||
describe('helpers', () => { | ||
describe('addPadding', () => { | ||
it('should add correct spacing', () => { | ||
expect(addPadding('Hello', 6)).toBe('Hello '); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import expect from 'expect'; | ||
|
||
import getDefaultValue from '../../../src/documentation/helpers/getDefaultValue'; | ||
|
||
describe('documentation', () => { | ||
describe('helpers', () => { | ||
describe('getDefaultValue', () => { | ||
it('should return null for undefined', () => { | ||
expect(getDefaultValue(undefined)) | ||
.toBe(undefined); | ||
}); | ||
|
||
it('should return null as string', () => { | ||
expect(getDefaultValue(null)) | ||
.toBe('null'); | ||
}); | ||
|
||
it('should return RegExp as string', () => { | ||
expect(getDefaultValue(/abc/)) | ||
.toEqual('/abc/'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import expect from 'expect'; | ||
|
||
import pad from '../../../src/documentation/helpers/pad'; | ||
|
||
describe('documentation', () => { | ||
describe('helpers', () => { | ||
describe('pad', () => { | ||
it('should pad correctly', () => { | ||
expect(pad(4, '-')).toBe('----'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import expect from 'expect'; | ||
|
||
import toCliOption from '../../../src/documentation/helpers/toCliOption'; | ||
|
||
describe('documentation', () => { | ||
describe('helpers', () => { | ||
describe('toCliOption', () => { | ||
it('should return a option correct', () => { | ||
expect(toCliOption(['build', 'option2'])).toBe('--build-option2'); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.