Skip to content

rename t.ok() to t.truthy() and t.notOk() to t.falsy() #716

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

Merged
merged 6 commits into from
Apr 6, 2016

Conversation

kentcdodds
Copy link
Contributor

Pretty confident that this is ready to go.

sloth-sparkle-FFV4J8uEtJKGQ

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @uiureo, @sotojuan and @kasperlewau to be potential reviewers

});

test.serial(t => {
const a = 'bar';

t.ok(a === 'foo', 'with message');
t.truthy(a === 'foo', 'with message');
Copy link
Member

Choose a reason for hiding this comment

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

Actually, these should just be t.true.

@kentcdodds
Copy link
Contributor Author

Responded to all comments :-)

@sindresorhus
Copy link
Member

LGTM

});
```

Will output:

```
t.ok(a.test(b) || b === c)
t.true(a.test(b) || b === c)
Copy link
Contributor

Choose a reason for hiding this comment

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

The power-assert example right under this should be moved a bit to the right. The lines do not point to what is described.

@sindresorhus sindresorhus changed the title refactor ok to truthy and notOk to falsy rename t.ok() to t.truthy() and t.notOk() to t.falsy() Apr 5, 2016
sindresorhus added a commit to avajs/atom-ava that referenced this pull request Apr 5, 2016
sindresorhus added a commit to avajs/sublime-ava that referenced this pull request Apr 5, 2016
@sindresorhus
Copy link
Member

Seems you need to update some test assertions too.

@kentcdodds
Copy link
Contributor Author

I guess this is why we have Travis :-)

warnerarchive-classic-film-alfred-hitchcock-suspicion-l2JJFTildjINz4cKY

@kentcdodds
Copy link
Contributor Author

Updated. Should be good to go now :D

@vadimdemedes
Copy link
Contributor

LGTM!

@jamestalmage jamestalmage merged commit a7f50eb into avajs:master Apr 6, 2016
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.

7 participants