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

32129139: Improve some unit tests #487

Merged
merged 4 commits into from
Apr 10, 2024

Conversation

DamienCassou
Copy link
Member

@DamienCassou DamienCassou commented Apr 10, 2024

@DamienCassou DamienCassou force-pushed the 32129139/Improve_some_unit_tests branch from 1335074 to 1239e04 Compare April 10, 2024 07:19
@DamienCassou DamienCassou marked this pull request as ready for review April 10, 2024 07:21
Copy link
Contributor

@ValentinaVasile ValentinaVasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r4.
Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @BenjaminVanRyseghem, @DamienCassou, @danglotb, @JohanBriglia, and @josquindebaz)


src/test/router/routerTest.js line 187 at r4 (raw file):

		// Assert that callback was executed
		expect(spy).toHaveBeenCalledWith(jasmine.anything());
	});

Why is this assertion better than the previous one?

Copy link
Member Author

@DamienCassou DamienCassou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @BenjaminVanRyseghem, @danglotb, @JohanBriglia, @josquindebaz, and @ValentinaVasile)


src/test/router/routerTest.js line 187 at r4 (raw file):

Previously, ValentinaVasile (Valentina Vasile) wrote…

Why is this assertion better than the previous one?

it checks the function was called with one and only one argument. Not much better I agree but some eslint rules forbid the use of toHaveBeenCalled().

Copy link
Contributor

@ValentinaVasile ValentinaVasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: all files reviewed (commit messages unreviewed), 1 unresolved discussion (waiting on @BenjaminVanRyseghem, @DamienCassou, @danglotb, @JohanBriglia, and @josquindebaz)


src/test/router/routerTest.js line 187 at r4 (raw file):

Previously, DamienCassou (Damien Cassou) wrote…

it checks the function was called with one and only one argument. Not much better I agree but some eslint rules forbid the use of toHaveBeenCalled().

thanks for the answer

Copy link

@josquindebaz josquindebaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @BenjaminVanRyseghem, @DamienCassou, @danglotb, and @JohanBriglia)

Copy link

@josquindebaz josquindebaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @BenjaminVanRyseghem, @DamienCassou, @danglotb, and @JohanBriglia)

@DamienCassou DamienCassou force-pushed the 32129139/Improve_some_unit_tests branch from 1239e04 to 3e91982 Compare April 10, 2024 07:36
@DamienCassou DamienCassou merged commit b45a487 into master Apr 10, 2024
1 of 2 checks passed
@DamienCassou DamienCassou deleted the 32129139/Improve_some_unit_tests branch April 10, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants