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

unit tests for sprite map and getSpriteArray() #29088

Merged
merged 2 commits into from Jun 12, 2019
Merged

unit tests for sprite map and getSpriteArray() #29088

merged 2 commits into from Jun 12, 2019

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Jun 12, 2019

Test coverage for getSpriteArray(), getAnimationsInUse(), getSpriteIdsInUse(), addSprite(), deleteSprite() and indirectly for private function allSpritesWithAnimation()

@@ -0,0 +1,100 @@
/* global p5 */
import {expect} from '../../../util/configuredChai';
Copy link
Contributor

Choose a reason for hiding this comment

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

use ../../../util/reconfiguredChai since configuredChai contains a module that is being deprecated.


describe('Sprite Utils', () => {
let gameLabP5, createSprite, animation;
// Using the aggressive sandbox here because the P5 library generates
Copy link
Contributor

Choose a reason for hiding this comment

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

aggressive sandbox?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not entirely sure, I was using GameLabSpriteTest as a guide. But it doesn't seem to be necessary so I deleted it.

Copy link
Contributor

@jmkulwik jmkulwik left a comment

Choose a reason for hiding this comment

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

Signed off assuming the comments I left get addressed.

@ajpal ajpal merged commit 921adcd into staging Jun 12, 2019
@ajpal ajpal deleted the spritelab-tests branch June 12, 2019 23:48
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.

None yet

2 participants