File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
packages/@vue/cli-test-utils Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,17 @@ import { Application } from 'express'
3
3
declare function createJSONServer (
4
4
/**
5
5
* Either a path to a json file (e.g. 'db.json') or an object in memory
6
+ *
7
+ * Default:
8
+ *{
9
+ * 'posts': [
10
+ * { 'id': 1, 'title': 'json-server', 'author': 'typicode' }
11
+ * ],
12
+ * 'comments': [
13
+ * { 'id': 1, 'body': 'some comment', 'postId': 1 }
14
+ * ],
15
+ * 'profile': { 'name': 'typicode' }
16
+ *}
6
17
*/
7
18
data ?: string | object ,
8
19
) : Application
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ declare function createTestProject(
20
20
* }
21
21
*/
22
22
preset : GeneratorRootOptions ,
23
+ /** `path.resolve(cwd, name)` will be the project's root directory */
23
24
cwd ?: string | null ,
24
25
/**
25
26
* if init git repo
@@ -35,7 +36,7 @@ declare function createTestProject(
35
36
/** read the content for the file */
36
37
read : ( file : string ) => Promise < string >
37
38
/** write file to project */
38
- write : ( file : string , content : string ) => Promise < void >
39
+ write : ( file : string , content : any ) => Promise < void >
39
40
/** execa command at root path of project */
40
41
run : ( command : string , args ?: ReadonlyArray < string > ) => execa . ExecaChildProcess
41
42
/** delete the file of project */
You can’t perform that action at this time.
0 commit comments