Skip to content

Commit 3eb7aa5

Browse files
committed
Fixed invalid path in test.
1 parent c8d3c59 commit 3eb7aa5

File tree

2 files changed

+10
-47
lines changed

2 files changed

+10
-47
lines changed

packages/doxdox-parser-dox/src/__snapshots__/index.test.ts.snap

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -99,47 +99,10 @@ exports[`dox parser parse example jsdoc headers (declaration methods) 1`] = `
9999
exports[`dox parser parse example jsdoc headers (function methods) 1`] = `
100100
{
101101
"methods": [
102-
{
103-
"description": "Finds file in path.
104-
105-
console.log(await findFileInPath('./', 'package.json'));
106-
console.log(await findFileInPath('../', 'package.json'));
107-
console.log(await findFileInPath('~/git/github/doxdox/', '.package.json'));",
108-
"fullName": "findFileInPath(input, fileName)",
109-
"name": "findFileInPath",
110-
"params": [
111-
{
112-
"description": "Directory to check for file.",
113-
"name": "input",
114-
"types": [
115-
"string",
116-
],
117-
},
118-
{
119-
"description": "= 'package.json'] File name to check for.",
120-
"name": "fileName",
121-
"types": [
122-
"string",
123-
],
124-
},
125-
],
126-
"private": false,
127-
"returns": [
128-
{
129-
"description": "Path to package.json file.",
130-
"name": null,
131-
"types": [
132-
"Promise.<string|null>",
133-
],
134-
},
135-
],
136-
"slug": "test-mocks-declaration-js-findfileinpath",
137-
"type": "declaration",
138-
},
139102
{
140103
"description": "Get the current working directory.",
141-
"fullName": "getCurrentWorkingDirectory()",
142-
"name": "getCurrentWorkingDirectory",
104+
"fullName": "getCurrentWorkingDirectory()()",
105+
"name": "getCurrentWorkingDirectory()",
143106
"params": [],
144107
"private": false,
145108
"returns": [
@@ -151,13 +114,13 @@ exports[`dox parser parse example jsdoc headers (function methods) 1`] = `
151114
],
152115
},
153116
],
154-
"slug": "test-mocks-declaration-js-getcurrentworkingdirectory",
155-
"type": "declaration",
117+
"slug": "test-mocks-function-js-getcurrentworkingdirectory",
118+
"type": "function",
156119
},
157120
{
158121
"description": "Get the root directory of the package, supplied path or URL.",
159-
"fullName": "getRootDirPath(url)",
160-
"name": "getRootDirPath",
122+
"fullName": "getRootDirPath()(url)",
123+
"name": "getRootDirPath()",
161124
"params": [
162125
{
163126
"description": "Optional path or URL.",
@@ -177,10 +140,10 @@ exports[`dox parser parse example jsdoc headers (function methods) 1`] = `
177140
],
178141
},
179142
],
180-
"slug": "test-mocks-declaration-js-getrootdirpath",
181-
"type": "declaration",
143+
"slug": "test-mocks-function-js-getrootdirpath",
144+
"type": "function",
182145
},
183146
],
184-
"path": "./test/mocks/declaration.js",
147+
"path": "./test/mocks/function.js",
185148
}
186149
`;

packages/doxdox-parser-dox/src/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('dox parser', () => {
88
});
99
it('parse example jsdoc headers (function methods)', async () => {
1010
await expect(
11-
parse(process.cwd(), './test/mocks/declaration.js')
11+
parse(process.cwd(), './test/mocks/function.js')
1212
).resolves.toMatchSnapshot();
1313
});
1414
it('parse empty string', async () => {

0 commit comments

Comments
 (0)