From 138879a2120562588e404d48ea30c4308433b1ba Mon Sep 17 00:00:00 2001 From: Yelaman Yelmuratov Date: Sun, 30 Jun 2024 20:52:51 +0500 Subject: [PATCH] - t return normally to true for linux availability test --- .../test/groups/diff_tools_tests.dart | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/packages/approval_tests/test/groups/diff_tools_tests.dart b/packages/approval_tests/test/groups/diff_tools_tests.dart index 344dd52..55501d4 100644 --- a/packages/approval_tests/test/groups/diff_tools_tests.dart +++ b/packages/approval_tests/test/groups/diff_tools_tests.dart @@ -24,10 +24,8 @@ void main() { ); // Setup: paths to existent files - const existentApprovedPath = - 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = - 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -50,10 +48,8 @@ void main() { ); // Setup: paths to existent files - const existentApprovedPath = - 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = - 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -78,11 +74,11 @@ void main() { // Expect an exception to be thrown expect( reporter.isReporterAvailable, - isLinux ? returnsNormally : false, + isLinux, ); ApprovalLogger.success( - "Test Passed: Successfully handled availability: ${isLinux ? 'normal' : 'false'} for Android Studio DiffReporter on Linux.", + "Test Passed: Successfully handled availability: $isLinux for Android Studio DiffReporter on Linux.", ); }); @@ -93,10 +89,8 @@ void main() { ); // Setup: paths to existent files - const existentApprovedPath = - 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = - 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -114,10 +108,8 @@ void main() { test('verify string with Git reporter', () { // Setup: paths to existent files - const existentApprovedPath = - 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = - 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect( @@ -143,9 +135,7 @@ void main() { ); }); - test( - 'gitDiffFiles should return an empty string if no differences for valid files', - () { + test('gitDiffFiles should return an empty string if no differences for valid files', () { final File path0 = File('/path/to/existing/file0'); final FileSystemEntity path1 = File('/path/to/existing/file1'); @@ -155,15 +145,12 @@ void main() { }); test('GitReporter with not correct custom diff info', () { - const DiffInfo customDiffInfo = - DiffInfo(name: "G1t", command: 'g1t', arg: 'diff --no-index'); + const DiffInfo customDiffInfo = DiffInfo(name: "G1t", command: 'g1t', arg: 'diff --no-index'); const gitReporter = GitReporter(customDiffInfo: customDiffInfo); - const existentApprovedPath = - 'test/approved_files/approval_test.verify.approved.txt'; - const existentReceivedPath = - 'test/approved_files/approval_test.verify.received.txt'; + const existentApprovedPath = 'test/approved_files/approval_test.verify.approved.txt'; + const existentReceivedPath = 'test/approved_files/approval_test.verify.received.txt'; // Expect an exception to be thrown expect(