Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sinon: bump version to 12.0.1 #20528

Closed
wants to merge 38 commits into from
Closed

Conversation

ksercs
Copy link
Contributor

@ksercs ksercs commented Dec 14, 2021

Migration points:

  • stub.callsFake replaces stub(obj, ‘meth’, fn)
  • replace spy.reset with spy.resetHistory
  • change default content-type header parameter when useFakeXMLHttpRequest is used (nise issue, sinon default value specifying code )
  • get rid of sinon.test (sinon is a SandBox by default now)
  • some timers are increased because of UseFakeTimers re-implementation: nullish timers do not run on the current iteration any more
  • get rid of some sinon private API using: callTimer, firstTimerInRange, etc

@ksercs ksercs added 22_1 WIP Work in progress labels Dec 14, 2021
@ksercs ksercs self-assigned this Dec 14, 2021
@ksercs
Copy link
Contributor Author

ksercs commented Dec 15, 2021

I close this PR, because after update we have big problems with timers.

In the previous sinon versions scarcely planned nullish settimeout was ticked on the current iteration (see this code). But now nullish settimeout is planned for a one ms from now: proof.

We have some nullish settimeouts (expecially, in grids), so tests are in a big trouble.

Sample of broken scenarios:

QUnit.test('broken scenario', function(assert) {
        setTimeout(() => {
            console.log('main');
            setTimeout(() => {
                console.log('empty');
            });
        }, 1000);
        this.clock.tick(1000);
        // "empty" is not logged presently
    });

@ksercs ksercs closed this Dec 15, 2021
@timbset timbset mentioned this pull request Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
22_1 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant