Skip to content

Commit

Permalink
Merge pull request #1 from jtmcdole/main
Browse files Browse the repository at this point in the history
First pr; test merge queue
  • Loading branch information
jtmcdole authored Oct 9, 2024
2 parents f709e68 + 3262019 commit d6be1fa
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
pubspec.lock
30 changes: 30 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
Empty file added lib/pass.dart
Empty file.
15 changes: 15 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: flaux
description: A sample command-line application with basic argument parsing.
version: 0.0.1
# repository: https://github.com/my_org/my_repo
environment:
sdk: 3.5.3

# Add regular dependencies here.
dependencies:
args: ^2.4.2

dev_dependencies:
lints: ^4.0.0
test: ^1.24.0
path: ^1.9.0
34 changes: 34 additions & 0 deletions test/fake_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import 'dart:io';

import 'package:test/expect.dart';
import 'package:test/scaffolding.dart';
import 'package:path/path.dart' as path;

main() {

String delayInSeconds = String.fromEnvironment('test_delay', defaultValue: "0.0");
final seconds = double.parse(delayInSeconds);
final testDelay = Duration(seconds: seconds.toInt(), milliseconds: (seconds.remainder(1) * 1000).toInt());

tearDown(() async {
print('waiting $testDelay');
await Future.delayed(testDelay);
});

test('passes', () {
print('this test should pass');
expect(true, true);
});

test('fails if "fail.dart" present', () async {
final dir = Directory('lib');
if (!await dir.exists()) {
return;
}
final files = await dir.list().toList();
expect(files.any((f) {
if (f is! File) return false;
return path.equals('lib/fail.dart', f.path);
}), isFalse);
});
}

0 comments on commit d6be1fa

Please sign in to comment.