Skip to content

Commit 19c3d42

Browse files
Can’t use isA until we drop support for Dart 1
1 parent 0dcf3f2 commit 19c3d42

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

test/integration/copy_license_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void main() {
7979
group('Copy License Task', () {
8080
test('should warn if the license file does not exist', () async {
8181
expect(copyLicense(projectWithoutLicenseFile),
82-
throwsA(isA<NoLicenseFileException>()));
82+
throwsA(const isInstanceOf<NoLicenseFileException>()));
8383
});
8484

8585
test('should not apply license to files that already have it', () async {

test/integration/export_config_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void main() {
5151
json = convert.json.decode(output);
5252
}, returnsNormally);
5353

54-
expect(json, isA<Map>());
54+
expect(json, const isInstanceOf<Map>());
5555
});
5656

5757
test('should emit JSON with default config for projects without a dev.dart',

test/integration/test_test.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ void main() {
153153
group('Test Task', () {
154154
test('should fail if some unit tests fail', () async {
155155
expect(runTests(projectWithFailingTests, unit: true, integration: false),
156-
throwsA(isA<TestFailure>()));
156+
throwsA(const isInstanceOf<TestFailure>()));
157157
});
158158

159159
test('should fail if some integration tests fail', () async {
160160
expect(runTests(projectWithFailingTests, unit: false, integration: true),
161-
throwsA(isA<TestFailure>()));
161+
throwsA(const isInstanceOf<TestFailure>()));
162162
});
163163

164164
test('should run individual unit test', () async {
@@ -206,7 +206,8 @@ void main() {
206206
});
207207

208208
test('should warn if "test" package is not immediate dependency', () async {
209-
expect(runTests(projectWithoutTestPackage), throwsA(isA<TestFailure>()));
209+
expect(runTests(projectWithoutTestPackage),
210+
throwsA(const isInstanceOf<TestFailure>()));
210211
});
211212

212213
test('should run tests that require a Pub server', () async {
@@ -227,7 +228,7 @@ void main() {
227228

228229
test('should fail if named test does not exist', () async {
229230
expect(runTests(projectWithPassingTests, testName: 'non-existent test'),
230-
throwsA(isA<TestFailure>()));
231+
throwsA(const isInstanceOf<TestFailure>()));
231232
});
232233

233234
test('should allow you to specify a web-compiler', () async {
@@ -253,12 +254,12 @@ void main() {
253254

254255
test('should fail if using dartium on Dart2', () async {
255256
expect(runTests(projectWithPassingTests, platform: 'dartium'),
256-
throwsA(isA<TestFailure>()));
257+
throwsA(const isInstanceOf<TestFailure>()));
257258
}, tags: 'dart2-only');
258259

259260
test('should fail if using content-shell on Dart2', () async {
260261
expect(runTests(projectWithPassingTests, platform: 'content-shell'),
261-
throwsA(isA<TestFailure>()));
262+
throwsA(const isInstanceOf<TestFailure>()));
262263
}, tags: 'dart2-only');
263264

264265
test('should not fail if using dartium on Dart1', () async {

0 commit comments

Comments
 (0)