-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathobjectProperty.test.ts
More file actions
56 lines (50 loc) · 1.54 KB
/
objectProperty.test.ts
File metadata and controls
56 lines (50 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import * as prettier from "prettier";
import { AllOptions } from "../src/types";
function subject(code: string, options: Partial<AllOptions> = {}) {
return prettier.format(code, {
parser: "babel-flow",
plugins: ["prettier-plugin-jsdoc"],
jsdocSpaces: 1,
...options,
} as AllOptions);
}
test("object property", async () => {
const result = await subject(`
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
const obj = {
/**
* @param {object} [filters]
* @param {string} [filters.searchInput]
* @param {boolean} [filters.isActive]
* @param {boolean} [filters.isPerson]
* @param {import('../types').IdentityStatus} [filters.identityStatuses]
* @param {string} [filters.lastActivityFrom] YYYY-MM-DD
* @param {string} [filters.lastActivityTo]
* @param {string} [filters.registeredFrom]
* @param {string} [filters.registeredTo]
* @param {number} [filters.skip]
* @param {number} [filters.take]
* @param {string} [filters.orderBy]
* @param {boolean} [filters.orderDesc]
* @returns {import('axios').AxiosResponse<
import('../types').ResellerUserIntroduced[]
>}
*/
a(filters) {},
};
`);
expect(result).toMatchSnapshot();
});