Skip to content

Commit 8882fe2

Browse files
committed
chore(jsdoc-tests): upgrade jsdoc-tests
1 parent 0168c3f commit 8882fe2

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"glob-parent": "^5.1.0",
7676
"jest": "^29.0.3",
7777
"jest-environment-jsdom": "^29.0.3",
78-
"jsdoc-tests": "^0.1.0",
78+
"jsdoc-tests": "^1.1.0",
7979
"lerna": "^5.5.1",
8080
"mobx": "^5.15.4",
8181
"prettier": "^2.1.0",

packages/reactant-share/src/createApp.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const createSharedTabApp = async <T, S extends any[], R extends Renderer<S>>(
192192
* }
193193
* }
194194
*
195-
* (async () => {
195+
* export default async () => {
196196
* const transports = mockPairTransports();
197197
*
198198
* const server = await createSharedApp({
@@ -227,9 +227,7 @@ const createSharedTabApp = async <T, S extends any[], R extends Renderer<S>>(
227227
*
228228
* expect(client.instance.count).toBe(1);
229229
* expect(server.instance.count).toBe(1);
230-
*
231-
* global.done();
232-
* })();
230+
* };
233231
* ```
234232
*/
235233
export const createSharedApp = async <

packages/reactant-share/test/createApp.0.snap.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Counter {
1313
}
1414
}
1515

16-
(async () => {
16+
export default async () => {
1717
const transports = mockPairTransports();
1818

1919
const server = await createSharedApp({
@@ -48,6 +48,4 @@ class Counter {
4848

4949
expect(client.instance.count).toBe(1);
5050
expect(server.instance.count).toBe(1);
51-
52-
global.done();
53-
})();
51+
};
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// eslint-disable-next-line import/no-extraneous-dependencies
22
import { jsdocTests } from 'jsdoc-tests';
33

4-
test('base "createApp" function', (done) => {
5-
global.done = done;
6-
jsdocTests('../src/createApp.ts', __dirname, require);
4+
test('base "createApp" function', async () => {
5+
await jsdocTests('../src/createApp.ts', __dirname);
76
});

packages/reactant/test/createApp.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
import { jsdocTests } from 'jsdoc-tests';
33

44
test('base "createApp" function', () => {
5-
jsdocTests('../src/createApp.tsx', __dirname, require);
5+
jsdocTests('../src/createApp.tsx', __dirname);
66
});

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7830,10 +7830,10 @@ jscodeshift@^0.13.1:
78307830
temp "^0.8.4"
78317831
write-file-atomic "^2.3.0"
78327832

7833-
jsdoc-tests@^0.1.0:
7834-
version "0.1.0"
7835-
resolved "https://registry.yarnpkg.com/jsdoc-tests/-/jsdoc-tests-0.1.0.tgz#0b5b1d57a796245f8a43f4a02fd635017927f6d7"
7836-
integrity sha512-qjDlZ9BgVC/Y4egflxGqqofLMJn3BBz79zKwW8eXd82dSXdv+Q95731SzMRjA4j9VbaSPx7ZWL6Aj6T7SsrcGA==
7833+
jsdoc-tests@^1.1.0:
7834+
version "1.1.0"
7835+
resolved "https://registry.yarnpkg.com/jsdoc-tests/-/jsdoc-tests-1.1.0.tgz#e353b65f284df07d1ff15ca1a43be951bce1c5fd"
7836+
integrity sha512-kXWJm517vOlAHResJ813eyDpC32pGsfOfzlx+2ftJAAsiAp6eSBdiOBEU6Oa5PDALR+FmOc8WJ2kYRYgT35isw==
78377837
dependencies:
78387838
"@babel/parser" "^7.12.7"
78397839
markdown-it "^12.0.2"

0 commit comments

Comments
 (0)