Skip to content

Commit

Permalink
Rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
fatso83 committed Oct 19, 2023
1 parent b73c765 commit 8b16f52
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions test/issue-async.test.js → test/issue-483-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ const FakeTimers = require("../src/fake-timers-src");
const sinon = require("sinon");
const assert = require("assert");

/**
*
* @param cb
*/
function myFn(cb) {
queueMicrotask(() => cb());
}

describe("bug", function () {
describe("async time skippers should run microtasks", function () {
let clock;
const timers = ["runAll", "runToLast", "runAllAsync", "runToLastAsync"];
const timers = ["runAllAsync", "runToLastAsync"];

afterEach(function () {
clock.uninstall();
Expand All @@ -24,6 +20,7 @@ describe("bug", function () {
clock = FakeTimers.install({ toFake: ["queueMicrotask"] });
});

// eslint-disable-next-line mocha/no-setup-in-describe
timers.forEach((fastForward) => {
it(`should advance past queued microtasks using ${fastForward}`, async function () {
const cb = sinon.fake();
Expand All @@ -35,17 +32,3 @@ describe("bug", function () {
});
});
});

//it.each([
//() => jest.advanceTimersToNextTimer(),
//() => jest.advanceTimersByTime(1),
//() => jest.runAllTimers(),
//() => jest.runAllTicks(),
//() => jest.runOnlyPendingTimers(),
//])("should advance past queued microtasks using %s", (syncFastForward) => {
//jest.useFakeTimers();
//const cb = jest.fn();
//myFn(cb);
//syncFastForward();
//expect(cb).toHaveBeenCalled();
//});

0 comments on commit 8b16f52

Please sign in to comment.