Skip to content

Commit

Permalink
Adds skip to common_tests.dart test function. Uses it for failing…
Browse files Browse the repository at this point in the history
… tests. (dart-lang/file#121)
  • Loading branch information
Clement Skau authored and tvolkert committed Mar 22, 2019
1 parent e3a3e3a commit adc115f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/file/test/common_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ void runCommonTests(
void group(String description, void body()) =>
skipIfNecessary(description, () => testpkg.group(description, body));

void test(String description, FutureOr<void> body()) =>
void test(String description, FutureOr<void> body(), {dynamic skip}) =>
skipIfNecessary(description, () {
if (replay == null) {
testpkg.test(description, body);
testpkg.test(description, body, skip: skip);
} else {
group('rerun', () {
testpkg.setUp(() async {
Expand All @@ -114,7 +114,7 @@ void runCommonTests(
await Future.forEach(setUps, (SetUpTearDown setUp) => setUp());
});

testpkg.test(description, body);
testpkg.test(description, body, skip: skip);

testpkg.tearDown(() async {
for (SetUpTearDown tearDown in tearDowns) {
Expand Down Expand Up @@ -179,7 +179,7 @@ void runCommonTests(
test('considersBothSlashesEquivalent', () {
fs.directory(r'foo\bar_dir').createSync(recursive: true);
expect(fs.directory(r'foo/bar_dir'), exists);
});
}, skip: "Fails due to https://github.com/google/file.dart/issues/112");
});

group('file', () {
Expand Down Expand Up @@ -210,7 +210,7 @@ void runCommonTests(
test('considersBothSlashesEquivalent', () {
fs.file(r'foo\bar_file').createSync(recursive: true);
expect(fs.file(r'foo/bar_file'), exists);
});
}, skip: "Fails due to https://github.com/google/file.dart/issues/112");
});

group('link', () {
Expand Down

0 comments on commit adc115f

Please sign in to comment.