Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Writing tests #55

Open
makkoli opened this issue Aug 18, 2017 · 6 comments
Open

Writing tests #55

makkoli opened this issue Aug 18, 2017 · 6 comments

Comments

@makkoli
Copy link
Contributor

makkoli commented Aug 18, 2017

We need tests to be written for server and client side.

There are example tests in server/models/__tests__ and client/reducers/__tests__

@satyadeeproat
Copy link
Contributor

Anyone working on this right now?? Interested in writing test cases by myself

@makkoli
Copy link
Contributor Author

makkoli commented Aug 29, 2017

Writing tests is quite a bit of work. Multiple people can do this since a lot of tests need to be written.

@paulywill
Copy link
Member

@makkoli : how do we run the tests?

@makkoli
Copy link
Contributor Author

makkoli commented Oct 3, 2017

@paulywill

npm run test

All our scripts are in the package.json file.

@paulywill
Copy link
Member

@makkoli what's the difference between .assert and .equal?

ie.

        assert.equal(player.address.country,
					playerData.address.country,
					'has address country');
	assert.assert(player.leagueId,
					playerData.leagueId,
					'has leagues');

@makkoli
Copy link
Contributor Author

makkoli commented Oct 23, 2017

@paulywill In tape, our testing suite, .assert() is an alias for .ok(), which will coerce a value to see if it's truthy, so you don't pass in a second value to compare against since it just checks if it coerces to true.

The .equal() will check if the actual value returned === expected value you passed in. In this instance, the expected value data type you pass in can be a number, string, boolean, etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants