Skip to content

Commit 71970da

Browse files
committed
AC-1156: AC-1156: Move custom eslint tests to magento-coding-standard repo
- Fix typo in README and add missing 'void' on unit tests
1 parent f44af55 commit 71970da

9 files changed

+10
-10
lines changed

Magento2/Tests/Eslint/AbstractEslintTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class AbstractEslintTestCase extends TestCase
2020
* @param string $testFile
2121
* @param array $expectedMessages
2222
*/
23-
protected function assertFileContainsError(string $testFile, array $expectedMessages)
23+
protected function assertFileContainsError(string $testFile, array $expectedMessages): void
2424
{
2525
exec(
2626
'npm run eslint -- Magento2/Tests/Eslint/' . $testFile,

Magento2/Tests/Eslint/AndSelfTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class AndSelfTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'AndSelfTest.js',

Magento2/Tests/Eslint/BindUnbindTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class BindUnbindTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'BindUnbindTest.js',

Magento2/Tests/Eslint/ClickEventShorthandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class ClickEventShorthandTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'ClickEventShorthand.js',

Magento2/Tests/Eslint/DelegateUndelegateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class DelegateUndelegateTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'DelegateUndelegateTest.js',

Magento2/Tests/Eslint/EventShorthandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class EventShorthandTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'EventShorthandTest.js',

Magento2/Tests/Eslint/SizeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class SizeTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'SizeTest.js',

Magento2/Tests/Eslint/TrimTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class TrimTest extends AbstractEslintTestCase
1616
{
17-
public function testExecute()
17+
public function testExecute(): void
1818
{
1919
$this->assertFileContainsError(
2020
'TrimTest.js',

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ You need to run the following command to install all the necessary packages desc
107107
npm install
108108
```
109109

110-
After that, you can just execute the ESLint tests simply running:
110+
After that, you can just execute ESLint as follows:
111111
```bash
112-
npm run eslint -- eslint/rules
112+
npm run eslint -- path/to/analyze
113113
```
114114
## License
115115

0 commit comments

Comments
 (0)