1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-09 06:18:49 +00:00

add visual samples index tests to CI (#597)

This commit is contained in:
John Ryan
2020-12-01 22:45:02 -08:00
committed by GitHub
parent a29be3d45e
commit 1d33b3dcf7
2 changed files with 9 additions and 13 deletions

View File

@@ -57,6 +57,15 @@ jobs:
script: "./tool/travis_flutter_script.sh" script: "./tool/travis_flutter_script.sh"
env: FLUTTER_VERSION=beta env: FLUTTER_VERSION=beta
- name: Visual samples index tests
os: linux
dist: trusty
env: FLUTTER_VERSION=stable
script:
- cd web/samples_index
- ../../flutter/bin/dart pub get
- ../../flutter/bin/dart test
allow_failures: allow_failures:
- env: FLUTTER_VERSION=beta - env: FLUTTER_VERSION=beta

View File

@@ -41,19 +41,6 @@ void main() {
expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z')); expect(sample.date, DateTime.parse('2019-12-15T02:59:43.1Z'));
expect(sample.channel, 'stable'); expect(sample.channel, 'stable');
}); });
test('bad yaml', () async {
var file = File('test/yaml/bad.yaml');
var contents = await file.readAsString();
expect(contents, isNotEmpty);
expect(
() => checkedYamlDecode(contents, (m) => Index.fromJson(m),
sourceUrl: file.uri),
throwsA(predicate((e) =>
e is ParsedYamlException &&
e.message.endsWith('Unsupported value for "name".'))));
});
}); });
group('searching', () { group('searching', () {