Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8da5c35

Browse files
committed
test config
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parente1e66b8 commit8da5c35

File tree

2 files changed

+67
-5
lines changed

2 files changed

+67
-5
lines changed

‎src/templates/coderoad.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ config:
2929
commands:
3030
[]
3131
# - npm install
32-
## App versions helps to ensure compatability with the Extension
33-
appVersions:
34-
{}
35-
## Ensure compatability with a minimal VSCode CodeRoad version
36-
# vscode: '>=0.7.0'
32+
## App versions helps to ensure compatability with the Extension
33+
appVersions:
34+
{}
35+
## Ensure compatability with a minimal VSCode CodeRoad version
36+
# vscode: '>=0.7.0'
3737
## Repo information to load code from
3838
##
3939
repo:

‎tests/parse.test.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,66 @@ levels:
181181
expect(result.summary.description).toBe(expected.summary.description);
182182
expect(result.levels[0].content).toBe(expected.levels[0].content);
183183
});
184+
185+
it("should parse the tutorial config",()=>{
186+
constmd=`# Title
187+
188+
Description.
189+
`;
190+
constyaml=`
191+
config:
192+
testRunner:
193+
command: ./node_modules/.bin/mocha
194+
args:
195+
filter: --grep
196+
tap: --reporter=mocha-tap-reporter
197+
directory: coderoad
198+
setup:
199+
commits:
200+
- abcdefg1
201+
commands: []
202+
appVersions:
203+
vscode: '>=0.7.0'
204+
repo:
205+
uri: https://path.to/repo
206+
branch: aBranch
207+
dependencies:
208+
- name: node
209+
version: '>=10'
210+
`;
211+
constresult=parse(md,yaml);
212+
constexpected={
213+
summary:{
214+
description:"Description.\n\nSecond description line",
215+
},
216+
config:{
217+
testRunner:{
218+
command:"./node_modules/.bin/mocha",
219+
args:{
220+
filter:"--grep",
221+
tap:"--reporter=mocha-tap-reporter",
222+
},
223+
directory:"coderoad",
224+
setup:{
225+
commits:["abcdefg1"],
226+
commands:[],
227+
},
228+
},
229+
repo:{
230+
uri:"https://path.to/repo",
231+
branch:"aBranch",
232+
},
233+
dependencies:[
234+
{
235+
name:"node",
236+
version:">=10",
237+
},
238+
],
239+
appVersions:{
240+
vscode:">=0.7.0",
241+
},
242+
},
243+
};
244+
expect(result.config).toEqual(expected.config);
245+
});
184246
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp