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

Assertions on results of method execution #14

Open
ghost opened this issue Dec 16, 2014 · 1 comment
Open

Assertions on results of method execution #14

ghost opened this issue Dec 16, 2014 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Dec 16, 2014

It would be nice if there would be assertions that let you execute a js on the page and asserts the return value with a value to check if the js works correctly.

@asciidisco asciidisco self-assigned this Apr 23, 2015
@asciidisco
Copy link
Member

There is some kind of experimental API, that does this (kind of):

.execute(function () {
  var time = new Date(window.commentTimestamp);
  this.assert.ok((time.getMonth() === 2), 'Month has been set correct in the timestamp');
})

It only supports the .ok() assertion for now, which just checks if the given value is truthyor not.

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

No branches or pull requests

1 participant