From aa27bc4ceb056f595b2a3c74789b400931faf9a0 Mon Sep 17 00:00:00 2001 From: Kara Brightwell Date: Wed, 24 Apr 2024 17:19:15 +0100 Subject: [PATCH] test: update args for task.run calls that have destructuring --- plugins/eslint/test/tasks/eslint.test.ts | 4 ++-- plugins/prettier/test/tasks/prettier.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/eslint/test/tasks/eslint.test.ts b/plugins/eslint/test/tasks/eslint.test.ts index 37008f3cb..96294184e 100644 --- a/plugins/eslint/test/tasks/eslint.test.ts +++ b/plugins/eslint/test/tasks/eslint.test.ts @@ -42,7 +42,7 @@ describe('eslint', () => { } ) - await expect(task.run()).resolves.toBeUndefined() + await expect(task.run({ command: 'test:local' })).resolves.toBeUndefined() }) it('should fail on linter error', async () => { @@ -56,7 +56,7 @@ describe('eslint', () => { } ) - await expect(task.run()).rejects.toHaveProperty( + await expect(task.run({ command: 'test:local' })).rejects.toHaveProperty( 'details', expect.stringContaining('1 problem (1 error, 0 warnings)') ) diff --git a/plugins/prettier/test/tasks/prettier.test.ts b/plugins/prettier/test/tasks/prettier.test.ts index ba18f6806..809183d91 100644 --- a/plugins/prettier/test/tasks/prettier.test.ts +++ b/plugins/prettier/test/tasks/prettier.test.ts @@ -38,7 +38,7 @@ describe('prettier', () => { ignoreFile: 'nonexistent prettierignore' } ) - await task.run() + await task.run({ command: 'format:local' }) const prettified = await fsp.readFile(path.join(testDirectory, 'unformatted.ts'), 'utf8') expect(prettified).toEqual(formattedDefaultFixture) }) @@ -56,7 +56,7 @@ describe('prettier', () => { } ) - await task.run() + await task.run({ command: 'format:local' }) const prettified = await fsp.readFile(path.join(testDirectory, 'unformatted.ts'), 'utf8') expect(prettified).toEqual(formattedConfigFileFixture) })