Skip to content

Commit 674e2a9

Browse files
committed
chore: what
1 parent fb18138 commit 674e2a9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/commands/pull.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ const TEST_ACTOR_GIT_REPO: ActorCollectionCreateOptions = {
9797

9898
useAuthSetup({ perTest: false });
9999

100+
const originalCwd = process.cwd();
100101
let cwd: string = process.cwd();
101102

102103
function setProcessCwd(newCwd: string) {
@@ -174,7 +175,9 @@ describe('apify pull', () => {
174175

175176
await runCommand(ActorsPullCommand, { args_actorId: testActor.id });
176177

177-
const actorJson = JSON.parse(readFileSync(join(testActor.name, DEPRECATED_LOCAL_CONFIG_NAME), 'utf8'));
178+
const actorJson = JSON.parse(
179+
readFileSync(join(originalCwd, testActor.name, DEPRECATED_LOCAL_CONFIG_NAME), 'utf8'),
180+
);
178181

179182
expect(actorJson.name).to.be.eql('baidu-scraper');
180183
});
@@ -195,10 +198,10 @@ describe('apify pull', () => {
195198
'\t',
196199
);
197200

198-
await mkdir(join('pull-test-no-name', '.actor'), { recursive: true });
201+
await mkdir(join(originalCwd, 'pull-test-no-name', '.actor'), { recursive: true });
199202

200203
writeFileSync(
201-
join('pull-test-no-name', LOCAL_CONFIG_PATH),
204+
join(originalCwd, 'pull-test-no-name', LOCAL_CONFIG_PATH),
202205
(TEST_ACTOR_SOURCE_FILES.versions![0] as any).sourceFiles[2].content,
203206
);
204207

@@ -207,7 +210,7 @@ describe('apify pull', () => {
207210

208211
await setTimeout(500);
209212

210-
const exists = await access(join('pull-test-no-name', 'src', '__init__.py'))
213+
const exists = await access(join(originalCwd, 'pull-test-no-name', 'src', '__init__.py'))
211214
.then(() => true)
212215
.catch(() => false);
213216

0 commit comments

Comments
 (0)