@cparra/apex-reflection 1.10.0 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,6 +184,21 @@ describe('Class reflection', () => {
184
184
  expect(result.annotations[0].elementValues[0].value).toBe('true');
185
185
  });
186
186
 
187
+ test('Can have annotations with parameters after the docs', () => {
188
+ const classBody = `
189
+ /**
190
+ * @description Account related operations.
191
+ */
192
+ @RestResource(urlMapping='/Account/*')
193
+ global with sharing class SampleRestResource {}
194
+ `;
195
+ const result = (reflect(classBody)).typeMirror as ClassMirror;
196
+ expect(result.annotations.length).toBe(1);
197
+ expect(result.annotations[0].elementValues.length).toBe(1);
198
+ expect(result.annotations[0].elementValues[0].key).toBe('urlMapping');
199
+ expect(result.annotations[0].elementValues[0].value).toBe('\'/Account/*\'');
200
+ });
201
+
187
202
  test('Can have constructors', () => {
188
203
  const classBody = `
189
204
  public with sharing class MyClass {
package/jest.config.js CHANGED
@@ -1,11 +1,11 @@
1
- // eslint-disable-next-line no-undef
2
- module.exports = {
3
- roots: ["<rootDir>/."],
4
- testMatch: [
5
- "**/__tests__/**/*.+(ts|tsx|js)",
6
- "**/?(*.)+(spec|test).+(ts|tsx|js)",
7
- ],
8
- transform: {
9
- "^.+\\.(ts|tsx)$": "ts-jest",
10
- },
11
- };
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ roots: ["<rootDir>/."],
4
+ testMatch: [
5
+ "**/__tests__/**/*.+(ts|tsx|js)",
6
+ "**/?(*.)+(spec|test).+(ts|tsx|js)",
7
+ ],
8
+ transform: {
9
+ "^.+\\.(ts|tsx)$": "ts-jest",
10
+ },
11
+ };