GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mocha tests terminating before after/afterEach finishes · Issue #3575 · feathersjs/feathers

mocha tests terminating before after/afterEach finishes #3575

New issue
Copy link
New issue
Copy link
Open
Open
mocha tests terminating before after/afterEach finishes#3575
Copy link

Description

@ewah
ewah
opened on Mar 14, 2025
Issue body actions

because the package.json mocha script has to be run with --exit

for the last test/test suite after() and afterEach() are prematurely terminated and never finish

Activity

  1. ewah
    changed the title [-]mocha tests exiting before after/afterEach finishes[/-] [+]mocha tests terminating before after/afterEach finishes[/+] on Mar 14, 2025
  2. ewah commented on Mar 14, 2025

    @ewah
    ewah
    on Mar 14, 2025
    Author
    More actions

    unfortunately i'm getting around this by creating a test file test/z/z.test.js. (the funny names are for -g [name] flag)

    describe('sleep, so asyncs can finish', () => {
      const sleep = (ms) => {
        return new Promise((resolve) => setTimeout(resolve, ms));
      };
    
      let alreadySlept = false;
    
      it('MINIMUM sleep 2s', async function () {
        if (alreadySlept) return;
        this.timeout(3000);
        await sleep(2000);
        alreadySlept = true;
      });
    
      it('BASIC sleep 2s', async function () {
        if (alreadySlept) return;
        this.timeout(3000);
        await sleep(2000);
        alreadySlept = true;
      });
    
      it('INTEGRATION sleep 2s', async function () {
        if (alreadySlept) return;
        this.timeout(3000);
        await sleep(2000);
        alreadySlept = true;
      });
    });
    
  3. daffl commented on Sep 9, 2025

    @daffl
    daffl
    on Sep 9, 2025
    Member
    More actions

    You can update the test configuration to your needs - e.g. by removing the --exit.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.