Skip to content

Commit

Permalink
. t updated diff tools tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yelmuratoff committed May 18, 2024
1 parent 64f2df2 commit c7de681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/groups/diff_tools_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import 'package:test/test.dart';
import '../approval_test.dart';

void main() {
final isWindows = Platform.isWindows;
final isLinux = Platform.isLinux;

group('Approvals: test for Diff Tools', () {
setUpAll(() {
ApprovalLogger.log(
Expand All @@ -21,6 +18,7 @@ void main() {
ide: ComparatorIDE.studio,
platformWrapper: WindowsPlatformWrapper(),
);
final isWindows = reporter.platformWrapper.isWindows;

// Setup: paths to existent files
const existentApprovedPath =
Expand Down Expand Up @@ -48,6 +46,8 @@ void main() {
platformWrapper: LinuxPlatformWrapper(),
);

final isLinux = reporter.platformWrapper.isLinux;

// Setup: paths to existent files
const existentApprovedPath =
'test/approved_files/approval_test.verify.approved.txt';
Expand Down
12 changes: 8 additions & 4 deletions test/groups/minor_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ void main() {
),
);

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(
() => reporter.report(
Expand Down Expand Up @@ -147,7 +149,8 @@ void main() {
helper.fakeStackTracePath,
);

final filePathExtractor = FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher);
final filePathExtractor =
FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher);
final filePath = filePathExtractor.filePath;

expect(filePath, helper.testPath);
Expand All @@ -161,7 +164,8 @@ void main() {
'no file path in this stack trace\nother stack trace lines...',
);

const filePathExtractor = FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher);
const filePathExtractor =
FilePathExtractor(stackTraceFetcher: fakeStackTraceFetcher);

expect(
() => filePathExtractor.filePath,
Expand Down

0 comments on commit c7de681

Please sign in to comment.