-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from graycraft/release/v0.2.3-alpha
Release v0.2.3-alpha
- Loading branch information
Showing
262 changed files
with
17,587 additions
and
5,764 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
# @see https://editorconfig.org | ||
# @see https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig | ||
# https://editorconfig.org | ||
# https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig | ||
|
||
charset = utf-8 | ||
[*] | ||
root = true | ||
[*.{cjs,es,es6,js,jsm,json,json5,json6,jsonc,jsox,jsx,mjs,node,ts,tsx}] | ||
|
||
[**/*] | ||
charset = utf-8 | ||
|
||
[**/*.{cjs,cjsx,cts,ctsx,es,es6,js,jsm,json,json5,json6,jsonc,jsox,jsx,mjs,mjsx,mts,mtsx,node,ts,tsx}] | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
[*.md] | ||
# @see https://github.com/Microsoft/vscode/issues/1679#issuecomment-323608456 | ||
|
||
# https://github.com/Microsoft/vscode/issues/1679#issuecomment-323608456 | ||
[**/*.md] | ||
trim_trailing_whitespace = false |
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 +1,2 @@ | ||
NODE_NO_WARNINGS=1 | ||
NODE_OPTIONS=--experimental-vm-modules |
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,2 +1,3 @@ | ||
coverage | ||
node_modules | ||
response/**/snapshot |
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,4 +1,5 @@ | ||
# Directories with auto-generated files. | ||
.vscode | ||
collection | ||
coverage | ||
response/**/snapshot |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { parseArguments } from '#lib/utility.mjs'; | ||
|
||
describe('parseArguments', () => { | ||
test('root api', () => { | ||
expect(parseArguments(['root', 'api'])).toEqual({ | ||
explicit: {}, | ||
handler: '', | ||
implicit: [], | ||
options: {}, | ||
params: [], | ||
}); | ||
}); | ||
test('root api handler', () => { | ||
expect(parseArguments(['root', 'api', 'handler'])).toEqual({ | ||
explicit: {}, | ||
handler: 'handler', | ||
implicit: [], | ||
options: {}, | ||
params: [], | ||
}); | ||
}); | ||
test('root api handler param', () => { | ||
expect(parseArguments(['root', 'api', 'handler', 'param'])).toEqual({ | ||
explicit: {}, | ||
handler: 'handler', | ||
implicit: ['param'], | ||
options: {}, | ||
params: ['param'], | ||
}); | ||
}); | ||
test('root api handler param paramKey=paramValue', () => { | ||
expect(parseArguments(['root', 'api', 'handler', 'param', 'paramKey=paramValue'])).toEqual({ | ||
explicit: { paramKey: 'paramValue' }, | ||
handler: 'handler', | ||
implicit: ['param'], | ||
options: {}, | ||
params: ['param', { paramKey: 'paramValue' }], | ||
}); | ||
}); | ||
test('root api handler param paramKey=paramValue --aggr=optionValue', () => { | ||
expect( | ||
parseArguments([ | ||
'root', | ||
'api', | ||
'handler', | ||
'param', | ||
'paramKey=paramValue', | ||
'--aggr=optionValue', | ||
]), | ||
).toEqual({ | ||
explicit: { paramKey: 'paramValue' }, | ||
handler: 'handler', | ||
implicit: ['param'], | ||
options: { aggregate: true }, | ||
params: ['param', { paramKey: 'paramValue' }], | ||
}); | ||
}); | ||
test('root api handler param paramKey=paramValue --aggr=off', () => { | ||
expect( | ||
parseArguments(['root', 'api', 'handler', 'param', 'paramKey=paramValue', '--aggr=off']), | ||
).toEqual({ | ||
explicit: { paramKey: 'paramValue' }, | ||
handler: 'handler', | ||
implicit: ['param'], | ||
options: { aggregate: false }, | ||
params: ['param', { paramKey: 'paramValue' }], | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.