Skip to content

bug: aegir test --bail doesn't adhere to build configuration #1488

Open
@SgtPooki

Description

@SgtPooki

Describe the bug

Running tests with npx aegir test --bail false flag will not trigger aegir build which would be otherwise triggered by npx aegir test

To Reproduce
Steps to reproduce the behavior:

  1. Go to any project configured with aegir build and test, such as https://github.com/ipfs/helia-verified-fetch
  2. run npm run clean to ensure dist folder is removed
  3. run npm run test and see that tests run successfully after building
  4. run npm run clean to ensure that dist folder is removed
  5. run npm run test -- --bail false and see the below error message: Error: No test files found
image

Expected behavior
I expect the same test flow to occur, though mocha should no longer bail for any given test.

Additional context

I have been running some tests with DEBUG="test*,test*:trace" npm run test -- -g 'abort-handling'
and then running DEBUG="test*,test*:trace" npm run test -- -g 'abort-handling' --bail false while changing some things. When running tests without the bail flag, aegir builds my tests and then runs the tests as expected. With it, aegir does not rebuild the src & tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions