@cparra/apex-reflection 1.10.2 → 1.11.0

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.
@@ -171,6 +171,19 @@ describe('Class reflection', () => {
171
171
  expect(result.fields[1].name).toBe('var2');
172
172
  });
173
173
 
174
+ test('Can have transient fields', () => {
175
+ const classBody = `
176
+ public with sharing class MyClass {
177
+ transient String var1;
178
+ }
179
+ `;
180
+ const result = (reflect(classBody)).typeMirror as ClassMirror;
181
+ expect(result.fields.length).toBe(1);
182
+ expect(result.fields[0].type).toBe('String');
183
+ expect(result.fields[0].name).toBe('var1');
184
+ expect(result.fields[0].memberModifiers).toContain('transient');
185
+ });
186
+
174
187
  test('Can have annotations with parameters', () => {
175
188
  const classBody = `
176
189
  @IsTest(SeeAllData=true)
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
+ };