Skip to content

Test "Cron matchers day of week we pass a test for 'the bug'" is failing #8

Closed

Description

@nilsreichardt

Steps to reproduce

  1. Open project
  2. Run dart test

Output

00:01 +13 -1: test/cronparse_test.dart: Cron matchers day of week we pass a test for 'the bug' [E]                     
  Invalid argument(s): invalid cron expression: "* * *,* * SUN"
  package:cronparse/src/cronparse.dart 8:7  new Cron
  test/cronparse_test.dart 138:24           main.<fn>.<fn>.<fn>.<fn>

image

Additional information

Flutter Version

Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (10 days ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4

Cronparse version

cronparse: ^0.1.1

Activity

  1. nilsreichardt commented on Jul 11, 2021

    @nilsreichardt
    Author

    @justintout I would recommend to you to set up a GitHub action, which runs on every PR dart test, to prevent cases this like this.

  2. justintout commented on Sep 15, 2026

    @justintout
    Owner

    Fixed in #10, merged as 088b806 and bde8317.

    The test used the malformed expression * * *,* * SUN, which the parser rejected. It is now * * 13 * SUN asserted against 2019-11-24, a Sunday that is not the 13th, so it actually discriminates for the day-of-month/day-of-week OR rule instead of asserting something that passes either way.

    Your CI suggestion is done too. .github/workflows/test.yml runs dart pub get, dart analyze --fatal-warnings, the format check, and dart test on every push to main and every pull request (#12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions