mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
cca9464b09
Closes #25 Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net> Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
29 lines
756 B
Dart
29 lines
756 B
Dart
// Copyright 2019 Google Inc. Use of this source code is governed by an
|
|
// MIT-style license that can be found in the LICENSE file or at
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
@TestOn('vm')
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:path/path.dart' as p;
|
|
import 'package:test/test.dart';
|
|
import 'package:yaml/yaml.dart';
|
|
|
|
void main() {
|
|
group("YAML files are valid:", () {
|
|
for (var entry in [
|
|
...Directory.current.listSync(),
|
|
...Directory("pkg").listSync(recursive: true)
|
|
]) {
|
|
if (entry is File &&
|
|
(entry.path.endsWith(".yaml") || entry.path.endsWith(".yml"))) {
|
|
test(p.basename(entry.path), () {
|
|
// Shouldn't throw an error.
|
|
loadYaml(entry.readAsStringSync());
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|