-
Notifications
You must be signed in to change notification settings - Fork 124
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
Initial Tests #244
Comments
Problems during testing:
For 1. what was observed that "uuid" is function in browser but object in testing. It took me way too much time to suspect that "import" is not working. There might be other errors like this, but I'm stuck on 2. For 2. there are 2 ways we can take: mock missing functions or store selection in store. If we decide to mock, these are the references: |
@mekanix Thanks! Great work.
|
It's case by case. Sometimes we can just return dummy value, sometimes we must return something more meaningful, depending on what the rest of the code does. |
Okay, thanks. I don't have a strong opinion in this case, so take the simplest approach when possible and use your judgment. |
Most tests implemented in #706. |
Create the following tests:
getThought('')
should return a thought object in the root context.getThoughtsRanked([ROOT_TOKEN])
should contain only''
'A'
, the empty thought should be modified:''
should not existgetThought('A')
should return a thought object in the root context.getThoughtsRanked([ROOT_TOKEN])
should contain only'A'
'A'
, and hits Cmd + Enter a new subthought should be created:getThought('A')
should return a thought object in the root context.getThought('')
should return a thought object in the 'A' context.getThoughtsRanked([ROOT_TOKEN])
should contain only'A'
getThoughtsRanked(['A'])
should contain only''
getThought
,getThoughtsRanked
, DOM, andlocalForage
as above.getThought
,getThoughtsRanked
, DOM, andlocalForage
as above.getThought
,getThoughtsRanked
, DOM, andlocalForage
as above.The text was updated successfully, but these errors were encountered: