apify-test-tools 0.10.1-beta.2 → 0.10.1-beta.4

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.
Files changed (147) hide show
  1. package/.github/actions/checkout-restore-dependencies/action.yaml +4 -3
  2. package/.github/workflows/public_platform-tests-claude-investigate-and-fix.yaml +7 -2
  3. package/.github/workflows/public_platform-tests.yaml +0 -1
  4. package/.github/workflows-package-version +1 -1
  5. package/CHANGELOG.md +6 -0
  6. package/CONTRIBUTING.md +13 -3
  7. package/README.md +2 -2
  8. package/bin/build-from-local.ts +8 -7
  9. package/bin/build.ts +22 -21
  10. package/bin/diff-changes.ts +11 -10
  11. package/bin/diff-json-schema.ts +14 -12
  12. package/bin/git.ts +89 -47
  13. package/bin/logger.ts +23 -0
  14. package/bin/main.ts +44 -38
  15. package/bin/output.ts +6 -0
  16. package/bin/slack.ts +8 -7
  17. package/bin/test-report.ts +22 -21
  18. package/bin/types.ts +0 -1
  19. package/bin/utils/config/actor-json.ts +84 -0
  20. package/bin/utils/config/load-config.ts +46 -46
  21. package/bin/utils/config/parser.ts +33 -28
  22. package/bin/utils/config/structures/base.ts +7 -0
  23. package/bin/utils/json-file.ts +11 -14
  24. package/bin/utils/path/repo-relative.ts +156 -0
  25. package/bin/utils/path/schema.ts +18 -0
  26. package/bin/utils.ts +63 -44
  27. package/dist/bin/build-from-local.d.ts +1 -1
  28. package/dist/bin/build-from-local.d.ts.map +1 -1
  29. package/dist/bin/build-from-local.js +8 -7
  30. package/dist/bin/build-from-local.js.map +1 -1
  31. package/dist/bin/build.d.ts.map +1 -1
  32. package/dist/bin/build.js +22 -21
  33. package/dist/bin/build.js.map +1 -1
  34. package/dist/bin/diff-changes.d.ts +1 -1
  35. package/dist/bin/diff-changes.d.ts.map +1 -1
  36. package/dist/bin/diff-changes.js +9 -8
  37. package/dist/bin/diff-changes.js.map +1 -1
  38. package/dist/bin/diff-json-schema.d.ts +1 -1
  39. package/dist/bin/diff-json-schema.d.ts.map +1 -1
  40. package/dist/bin/diff-json-schema.js +13 -12
  41. package/dist/bin/diff-json-schema.js.map +1 -1
  42. package/dist/bin/git.d.ts +10 -10
  43. package/dist/bin/git.d.ts.map +1 -1
  44. package/dist/bin/git.js +78 -37
  45. package/dist/bin/git.js.map +1 -1
  46. package/dist/bin/logger.d.ts +11 -0
  47. package/dist/bin/logger.d.ts.map +1 -0
  48. package/dist/bin/logger.js +20 -0
  49. package/dist/bin/logger.js.map +1 -0
  50. package/dist/bin/main.d.ts +1 -1
  51. package/dist/bin/main.js +44 -38
  52. package/dist/bin/main.js.map +1 -1
  53. package/dist/bin/output.d.ts +3 -0
  54. package/dist/bin/output.d.ts.map +1 -0
  55. package/dist/bin/output.js +6 -0
  56. package/dist/bin/output.js.map +1 -0
  57. package/dist/bin/slack.d.ts.map +1 -1
  58. package/dist/bin/slack.js +8 -7
  59. package/dist/bin/slack.js.map +1 -1
  60. package/dist/bin/test-report.d.ts.map +1 -1
  61. package/dist/bin/test-report.js +22 -21
  62. package/dist/bin/test-report.js.map +1 -1
  63. package/dist/bin/types.d.ts +0 -1
  64. package/dist/bin/types.d.ts.map +1 -1
  65. package/dist/bin/utils/config/actor-json.d.ts +14 -0
  66. package/dist/bin/utils/config/actor-json.d.ts.map +1 -0
  67. package/dist/bin/utils/config/actor-json.js +60 -0
  68. package/dist/bin/utils/config/actor-json.js.map +1 -0
  69. package/dist/bin/utils/config/load-config.d.ts +12 -2
  70. package/dist/bin/utils/config/load-config.d.ts.map +1 -1
  71. package/dist/bin/utils/config/load-config.js +32 -31
  72. package/dist/bin/utils/config/load-config.js.map +1 -1
  73. package/dist/bin/utils/config/parser.d.ts +4 -12
  74. package/dist/bin/utils/config/parser.d.ts.map +1 -1
  75. package/dist/bin/utils/config/parser.js +24 -23
  76. package/dist/bin/utils/config/parser.js.map +1 -1
  77. package/dist/bin/utils/config/structures/base.d.ts +5 -0
  78. package/dist/bin/utils/config/structures/base.d.ts.map +1 -1
  79. package/dist/bin/utils/config/structures/base.js.map +1 -1
  80. package/dist/bin/utils/json-file.d.ts +3 -2
  81. package/dist/bin/utils/json-file.d.ts.map +1 -1
  82. package/dist/bin/utils/json-file.js +8 -13
  83. package/dist/bin/utils/json-file.js.map +1 -1
  84. package/dist/bin/utils/path/repo-relative.d.ts +35 -0
  85. package/dist/bin/utils/path/repo-relative.d.ts.map +1 -0
  86. package/dist/bin/utils/path/repo-relative.js +137 -0
  87. package/dist/bin/utils/path/repo-relative.js.map +1 -0
  88. package/dist/bin/utils/path/schema.d.ts +7 -0
  89. package/dist/bin/utils/path/schema.d.ts.map +1 -0
  90. package/dist/bin/utils/path/schema.js +16 -0
  91. package/dist/bin/utils/path/schema.js.map +1 -0
  92. package/dist/bin/utils.d.ts +14 -6
  93. package/dist/bin/utils.d.ts.map +1 -1
  94. package/dist/bin/utils.js +52 -36
  95. package/dist/bin/utils.js.map +1 -1
  96. package/dist/test/unit/bin/build-from-local.test.js +4 -40
  97. package/dist/test/unit/bin/build-from-local.test.js.map +1 -1
  98. package/dist/test/unit/bin/diff-changes.test.js +97 -96
  99. package/dist/test/unit/bin/diff-changes.test.js.map +1 -1
  100. package/dist/test/unit/bin/diff.test.js +52 -48
  101. package/dist/test/unit/bin/diff.test.js.map +1 -1
  102. package/dist/test/unit/bin/git-command.test.d.ts +2 -0
  103. package/dist/test/unit/bin/git-command.test.d.ts.map +1 -0
  104. package/dist/test/unit/bin/git-command.test.js +54 -0
  105. package/dist/test/unit/bin/git-command.test.js.map +1 -0
  106. package/dist/test/unit/bin/git.test.js +211 -94
  107. package/dist/test/unit/bin/git.test.js.map +1 -1
  108. package/dist/test/unit/bin/logger.test.d.ts +2 -0
  109. package/dist/test/unit/bin/logger.test.d.ts.map +1 -0
  110. package/dist/test/unit/bin/logger.test.js +44 -0
  111. package/dist/test/unit/bin/logger.test.js.map +1 -0
  112. package/dist/test/unit/bin/logging.test.d.ts +2 -0
  113. package/dist/test/unit/bin/logging.test.d.ts.map +1 -0
  114. package/dist/test/unit/bin/logging.test.js +43 -0
  115. package/dist/test/unit/bin/logging.test.js.map +1 -0
  116. package/dist/test/unit/bin/utils/config/load-config.test.js +47 -25
  117. package/dist/test/unit/bin/utils/config/load-config.test.js.map +1 -1
  118. package/dist/test/unit/bin/utils/config/parser.test.js +64 -19
  119. package/dist/test/unit/bin/utils/config/parser.test.js.map +1 -1
  120. package/dist/test/unit/bin/utils/files.test.js +16 -27
  121. package/dist/test/unit/bin/utils/files.test.js.map +1 -1
  122. package/dist/test/unit/bin/utils/path/repo-relative.test.d.ts +2 -0
  123. package/dist/test/unit/bin/utils/path/repo-relative.test.d.ts.map +1 -0
  124. package/dist/test/unit/bin/utils/path/repo-relative.test.js +196 -0
  125. package/dist/test/unit/bin/utils/path/repo-relative.test.js.map +1 -0
  126. package/dist/test/unit/bin/utils/path/schema.test.d.ts +2 -0
  127. package/dist/test/unit/bin/utils/path/schema.test.d.ts.map +1 -0
  128. package/dist/test/unit/bin/utils/path/schema.test.js +52 -0
  129. package/dist/test/unit/bin/utils/path/schema.test.js.map +1 -0
  130. package/dist/test/unit/should-built-and-test.test.js +40 -38
  131. package/dist/test/unit/should-built-and-test.test.js.map +1 -1
  132. package/dist/tsconfig.tsbuildinfo +1 -1
  133. package/eslint.config.mjs +9 -1
  134. package/package.json +5 -5
  135. package/test/unit/bin/build-from-local.test.ts +4 -54
  136. package/test/unit/bin/diff-changes.test.ts +97 -96
  137. package/test/unit/bin/diff.test.ts +53 -48
  138. package/test/unit/bin/git-command.test.ts +71 -0
  139. package/test/unit/bin/git.test.ts +246 -91
  140. package/test/unit/bin/logger.test.ts +55 -0
  141. package/test/unit/bin/logging.test.ts +52 -0
  142. package/test/unit/bin/utils/config/load-config.test.ts +63 -26
  143. package/test/unit/bin/utils/config/parser.test.ts +81 -27
  144. package/test/unit/bin/utils/files.test.ts +19 -33
  145. package/test/unit/bin/utils/path/repo-relative.test.ts +250 -0
  146. package/test/unit/bin/utils/path/schema.test.ts +65 -0
  147. package/test/unit/should-built-and-test.test.ts +40 -38
@@ -0,0 +1,65 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { ExistingDir, ExistingFile, RelativeDir, RelativeFile } from '../../../../../bin/utils/path/repo-relative.js';
4
+ import {
5
+ ExistingDirSchema,
6
+ ExistingFileSchema,
7
+ RelativeDirSchema,
8
+ RelativeFileSchema,
9
+ } from '../../../../../bin/utils/path/schema.js';
10
+
11
+ describe('RelativeDirSchema', () => {
12
+ it('normalizes a repo-relative directory', () => {
13
+ const parsed = RelativeDirSchema.parse('./actors//shop/');
14
+ expect(parsed).toBeInstanceOf(RelativeDir);
15
+ expect(parsed.path).toBe('actors/shop');
16
+ expect(RelativeDirSchema.parse('')).toEqual(RelativeDir.ROOT);
17
+ });
18
+
19
+ it('rejects paths outside the repo and non-string input', () => {
20
+ expect(RelativeDirSchema.safeParse('../outside').success).toBe(false);
21
+ expect(RelativeDirSchema.safeParse('/absolute').success).toBe(false);
22
+ expect(RelativeDirSchema.safeParse(123).success).toBe(false);
23
+ });
24
+ });
25
+
26
+ describe('ExistingDirSchema', () => {
27
+ it('parses an existing directory, including the repo root', () => {
28
+ const parsed = ExistingDirSchema.parse('./bin/');
29
+ expect(parsed).toBeInstanceOf(ExistingDir);
30
+ expect(parsed.path).toBe('bin');
31
+ expect(ExistingDirSchema.parse('').path).toBe('.');
32
+ });
33
+
34
+ it('rejects missing directories and files', () => {
35
+ expect(ExistingDirSchema.safeParse('missing-dir').success).toBe(false);
36
+ expect(ExistingDirSchema.safeParse('package.json').success).toBe(false);
37
+ });
38
+ });
39
+
40
+ describe('RelativeFileSchema', () => {
41
+ it('normalizes a repo-relative file', () => {
42
+ const parsed = RelativeFileSchema.parse('./actors//shop/actor.json');
43
+ expect(parsed).toBeInstanceOf(RelativeFile);
44
+ expect(parsed.path).toBe('actors/shop/actor.json');
45
+ });
46
+
47
+ it('rejects directory paths, paths outside the repo, and non-string input', () => {
48
+ for (const value of ['', '.', 'actors/shop/', '../outside.json', '/absolute.json', 123]) {
49
+ expect(RelativeFileSchema.safeParse(value).success).toBe(false);
50
+ }
51
+ });
52
+ });
53
+
54
+ describe('ExistingFileSchema', () => {
55
+ it('parses an existing file', () => {
56
+ const parsed = ExistingFileSchema.parse('./package.json');
57
+ expect(parsed).toBeInstanceOf(ExistingFile);
58
+ expect(parsed.path).toBe('package.json');
59
+ });
60
+
61
+ it('rejects missing files and directories', () => {
62
+ expect(ExistingFileSchema.safeParse('missing.txt').success).toBe(false);
63
+ expect(ExistingFileSchema.safeParse('bin').success).toBe(false);
64
+ });
65
+ });
@@ -40,13 +40,15 @@ describe('Should build and test parser', () => {
40
40
 
41
41
  beforeEach(() => {
42
42
  // Default: JSON changes are functional (triggers build/test)
43
- isCosmeticOnlyJsonSchemaSpy = vi.spyOn(DiffJsonSchema, 'isCosmeticOnlyJsonSchemaChange').mockReturnValue(false);
43
+ isCosmeticOnlyJsonSchemaSpy = vi
44
+ .spyOn(DiffJsonSchema, 'isCosmeticOnlyJsonSchemaChange')
45
+ .mockResolvedValue(false);
44
46
  });
45
47
 
46
- test('Ignores dev-only readme', () => {
48
+ test('Ignores dev-only readme', async () => {
47
49
  const FILES = ['README.md', 'code/README.md', 'shared/README.md'];
48
50
 
49
- const actorsChanged = getChangedActors({
51
+ const actorsChanged = await getChangedActors({
50
52
  actorConfigs: ACTOR_CONFIGS,
51
53
  isLatest: false,
52
54
  filepathsChanged: FILES,
@@ -56,10 +58,10 @@ describe('Should build and test parser', () => {
56
58
  expect(actorsChanged).toEqual([]);
57
59
  });
58
60
 
59
- test('Ignores other ignored files and folders', () => {
61
+ test('Ignores other ignored files and folders', async () => {
60
62
  const FILES = ['.vscode/', '.gitignore', '.husky/', '.eslintrc', '.editorconfig'];
61
63
 
62
- const actorsChanged = getChangedActors({
64
+ const actorsChanged = await getChangedActors({
63
65
  actorConfigs: ACTOR_CONFIGS,
64
66
  isLatest: false,
65
67
  filepathsChanged: FILES,
@@ -69,10 +71,10 @@ describe('Should build and test parser', () => {
69
71
  expect(actorsChanged).toEqual([]);
70
72
  });
71
73
 
72
- test('.actor/ changes trigger builds for broad-context actors', () => {
74
+ test('.actor/ changes trigger builds for broad-context actors', async () => {
73
75
  const FILES = ['.actor/actor.json'];
74
76
 
75
- const actorsChanged = getChangedActors({
77
+ const actorsChanged = await getChangedActors({
76
78
  actorConfigs: ACTOR_CONFIGS,
77
79
  isLatest: false,
78
80
  filepathsChanged: FILES,
@@ -82,10 +84,10 @@ describe('Should build and test parser', () => {
82
84
  expect(actorsChanged).toEqual(ACTOR_CONFIGS.slice(0, 2));
83
85
  });
84
86
 
85
- test('Root-level changelog is cosmetic for every actor, only on latest', () => {
87
+ test('Root-level changelog is cosmetic for every actor, only on latest', async () => {
86
88
  const FILES = ['shared/CHANGELOG.md', 'CHANGELOG.md'];
87
89
 
88
- const actorsChangedNotLatest = getChangedActors({
90
+ const actorsChangedNotLatest = await getChangedActors({
89
91
  actorConfigs: ACTOR_CONFIGS,
90
92
  isLatest: false,
91
93
  filepathsChanged: FILES,
@@ -93,7 +95,7 @@ describe('Should build and test parser', () => {
93
95
  });
94
96
  expect(actorsChangedNotLatest).toEqual([]);
95
97
 
96
- const actorsChangedLatest = getChangedActors({
98
+ const actorsChangedLatest = await getChangedActors({
97
99
  actorConfigs: ACTOR_CONFIGS,
98
100
  isLatest: true,
99
101
  filepathsChanged: FILES,
@@ -102,10 +104,10 @@ describe('Should build and test parser', () => {
102
104
  expect(actorsChangedLatest).toEqual(ACTOR_CONFIGS);
103
105
  });
104
106
 
105
- test('A changelog nested inside one actor own folder is excluded for sibling actors, only triggers that actor', () => {
107
+ test('A changelog nested inside one actor own folder is excluded for sibling actors, only triggers that actor', async () => {
106
108
  const FILES = ['actors/lukaskrivka_testing-github-integration-1/CHANGELOG.md'];
107
109
 
108
- const actorsChanged = getChangedActors({
110
+ const actorsChanged = await getChangedActors({
109
111
  actorConfigs: ACTOR_CONFIGS,
110
112
  isLatest: true,
111
113
  filepathsChanged: FILES,
@@ -115,10 +117,10 @@ describe('Should build and test parser', () => {
115
117
  expect(actorsChanged).toEqual([ACTOR_CONFIGS[0]]);
116
118
  });
117
119
 
118
- test('Code updated, tests broad-context actors', () => {
120
+ test('Code updated, tests broad-context actors', async () => {
119
121
  const FILES = ['code/src/main.ts', 'package.json'];
120
122
 
121
- const actorsChanged = getChangedActors({
123
+ const actorsChanged = await getChangedActors({
122
124
  actorConfigs: ACTOR_CONFIGS,
123
125
  isLatest: false,
124
126
  filepathsChanged: FILES,
@@ -128,14 +130,14 @@ describe('Should build and test parser', () => {
128
130
  expect(actorsChanged).toEqual(ACTOR_CONFIGS.slice(0, 2));
129
131
  });
130
132
 
131
- test('Specific Actor functionality configs updated', () => {
133
+ test('Specific Actor functionality configs updated', async () => {
132
134
  const FILES = [
133
135
  'actors/lukaskrivka_testing-github-integration-1/.actor/actor.json',
134
136
  'standalone-actors/lukaskrivka_test-standalone/Dockerfile',
135
137
  ];
136
138
  // Default mock returns false = functional change
137
139
 
138
- const actorsChanged = getChangedActors({
140
+ const actorsChanged = await getChangedActors({
139
141
  actorConfigs: ACTOR_CONFIGS,
140
142
  isLatest: false,
141
143
  filepathsChanged: FILES,
@@ -145,10 +147,10 @@ describe('Should build and test parser', () => {
145
147
  expect(actorsChanged).toEqual([ACTOR_CONFIGS[0], ACTOR_CONFIGS[2]]);
146
148
  });
147
149
 
148
- test('src/main.ts updated', () => {
150
+ test('src/main.ts updated', async () => {
149
151
  const FILES = ['src/main.ts'];
150
152
 
151
- const actorsChanged = getChangedActors({
153
+ const actorsChanged = await getChangedActors({
152
154
  actorConfigs: ACTOR_CONFIGS,
153
155
  isLatest: true,
154
156
  filepathsChanged: FILES,
@@ -158,7 +160,7 @@ describe('Should build and test parser', () => {
158
160
  expect(actorsChanged).toEqual(ACTOR_CONFIGS.slice(0, 2));
159
161
  });
160
162
 
161
- test('Actor folder, shared code and narrow-context actor updated', () => {
163
+ test('Actor folder, shared code and narrow-context actor updated', async () => {
162
164
  const FILES = [
163
165
  'actors/lukaskrivka_testing-github-integration-1/.actor/actor.json',
164
166
  'code/src/main.ts',
@@ -166,7 +168,7 @@ describe('Should build and test parser', () => {
166
168
  ];
167
169
  // Default mock returns false = functional change for the JSON file
168
170
 
169
- const actorsChanged = getChangedActors({
171
+ const actorsChanged = await getChangedActors({
170
172
  actorConfigs: ACTOR_CONFIGS,
171
173
  isLatest: false,
172
174
  filepathsChanged: FILES,
@@ -176,13 +178,13 @@ describe('Should build and test parser', () => {
176
178
  expect(actorsChanged).toEqual(ACTOR_CONFIGS);
177
179
  });
178
180
 
179
- test('Specific Actor non-functional configs updated', () => {
181
+ test('Specific Actor non-functional configs updated', async () => {
180
182
  const FILES = [
181
183
  'actors/lukaskrivka_testing-github-integration-2/.actor/README.md',
182
184
  'standalone-actors/lukaskrivka_test-standalone/CHANGELOG.md',
183
185
  ];
184
186
 
185
- const actorsChanged = getChangedActors({
187
+ const actorsChanged = await getChangedActors({
186
188
  actorConfigs: ACTOR_CONFIGS,
187
189
  isLatest: false,
188
190
  filepathsChanged: FILES,
@@ -192,11 +194,11 @@ describe('Should build and test parser', () => {
192
194
  expect(actorsChanged).toEqual([]);
193
195
  });
194
196
 
195
- test('JSON file with cosmetic-only changes in PR context (isLatest=false) skips tests', () => {
197
+ test('JSON file with cosmetic-only changes in PR context (isLatest=false) skips tests', async () => {
196
198
  const FILES = ['actors/lukaskrivka_testing-github-integration-1/.actor/actor.json'];
197
- isCosmeticOnlyJsonSchemaSpy.mockReturnValue(true);
199
+ isCosmeticOnlyJsonSchemaSpy.mockResolvedValue(true);
198
200
 
199
- const actorsChanged = getChangedActors({
201
+ const actorsChanged = await getChangedActors({
200
202
  actorConfigs: ACTOR_CONFIGS,
201
203
  isLatest: false,
202
204
  filepathsChanged: FILES,
@@ -206,11 +208,11 @@ describe('Should build and test parser', () => {
206
208
  expect(actorsChanged).toEqual([]);
207
209
  });
208
210
 
209
- test('JSON file with cosmetic-only changes in latest context still triggers build', () => {
211
+ test('JSON file with cosmetic-only changes in latest context still triggers build', async () => {
210
212
  const FILES = ['actors/lukaskrivka_testing-github-integration-1/.actor/actor.json'];
211
- isCosmeticOnlyJsonSchemaSpy.mockReturnValue(true);
213
+ isCosmeticOnlyJsonSchemaSpy.mockResolvedValue(true);
212
214
 
213
- const actorsChanged = getChangedActors({
215
+ const actorsChanged = await getChangedActors({
214
216
  actorConfigs: ACTOR_CONFIGS,
215
217
  isLatest: true,
216
218
  filepathsChanged: FILES,
@@ -220,11 +222,11 @@ describe('Should build and test parser', () => {
220
222
  expect(actorsChanged).toEqual([ACTOR_CONFIGS[0]]);
221
223
  });
222
224
 
223
- test('JSON file with functional changes triggers tests', () => {
225
+ test('JSON file with functional changes triggers tests', async () => {
224
226
  const FILES = ['actors/lukaskrivka_testing-github-integration-1/.actor/actor.json'];
225
227
  // Default mock returns false = functional change
226
228
 
227
- const actorsChanged = getChangedActors({
229
+ const actorsChanged = await getChangedActors({
228
230
  actorConfigs: ACTOR_CONFIGS,
229
231
  isLatest: false,
230
232
  filepathsChanged: FILES,
@@ -234,17 +236,17 @@ describe('Should build and test parser', () => {
234
236
  expect(actorsChanged).toEqual([ACTOR_CONFIGS[0]]);
235
237
  });
236
238
 
237
- test('Mix: one actor has cosmetic-only JSON change, another has functional JSON change', () => {
239
+ test('Mix: one actor has cosmetic-only JSON change, another has functional JSON change', async () => {
238
240
  const FILES = [
239
241
  'actors/lukaskrivka_testing-github-integration-1/.actor/actor.json',
240
242
  'actors/lukaskrivka_testing-github-integration-2/.actor/input_schema.json',
241
243
  ];
242
244
  // Actor 1 JSON is cosmetic-only, actor 2 JSON is functional
243
245
  isCosmeticOnlyJsonSchemaSpy.mockImplementation(
244
- (_commits, filepath: string) => !filepath.includes('input_schema.json'),
246
+ async (_commits, filepath: string) => !filepath.includes('input_schema.json'),
245
247
  );
246
248
 
247
- const actorsChanged = getChangedActors({
249
+ const actorsChanged = await getChangedActors({
248
250
  actorConfigs: ACTOR_CONFIGS,
249
251
  isLatest: false,
250
252
  filepathsChanged: FILES,
@@ -255,11 +257,11 @@ describe('Should build and test parser', () => {
255
257
  expect(actorsChanged).toEqual([ACTOR_CONFIGS[1]]);
256
258
  });
257
259
 
258
- test('Narrow-context actor with cosmetic-only JSON change in PR context skips tests', () => {
260
+ test('Narrow-context actor with cosmetic-only JSON change in PR context skips tests', async () => {
259
261
  const FILES = ['standalone-actors/lukaskrivka_test-standalone/.actor/actor.json'];
260
- isCosmeticOnlyJsonSchemaSpy.mockReturnValue(true);
262
+ isCosmeticOnlyJsonSchemaSpy.mockResolvedValue(true);
261
263
 
262
- const actorsChanged = getChangedActors({
264
+ const actorsChanged = await getChangedActors({
263
265
  actorConfigs: ACTOR_CONFIGS,
264
266
  isLatest: false,
265
267
  filepathsChanged: FILES,
@@ -269,7 +271,7 @@ describe('Should build and test parser', () => {
269
271
  expect(actorsChanged).toEqual([]);
270
272
  });
271
273
 
272
- test('Google Maps real user-case that had undefined', () => {
274
+ test('Google Maps real user-case that had undefined', async () => {
273
275
  const FILES = [
274
276
  'actors/compass_Google-Maps-Reviews-Scraper/.actor/INPUT_SCHEMA.json',
275
277
  'actors/compass_crawler-google-places/.actor/INPUT_SCHEMA.json',
@@ -352,7 +354,7 @@ describe('Should build and test parser', () => {
352
354
  },
353
355
  ];
354
356
 
355
- const actorsChanged = getChangedActors({
357
+ const actorsChanged = await getChangedActors({
356
358
  actorConfigs: ACTOR_CONFIGS_GOOGLE_MAPS,
357
359
  isLatest: false,
358
360
  filepathsChanged: FILES,