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

[typescript] added missing todo definition #846

Merged
merged 1 commit into from
May 23, 2016
Merged

[typescript] added missing todo definition #846

merged 1 commit into from
May 23, 2016

Conversation

andischerer
Copy link
Contributor

Hey guys,
first of all thanks for this awesome testrunner.

I've added the missing todo definition to the index.d.ts.

@jamestalmage
Copy link
Contributor

@SamVerschueren

@sindresorhus
Copy link
Member

We also need to add test.failing. Anything else that needs updating?

@sindresorhus
Copy link
Member

// @ivogabe

@jamestalmage
Copy link
Contributor

It would be good to land this as part of the upcoming release as well.

@ivogabe
Copy link
Contributor

ivogabe commented May 20, 2016

Does todo allow chaining? This definition doesn't allow it.

@jamestalmage
Copy link
Contributor

Yes. The only checks against todo are here.

  • It can't contain an implementation.
  • It must have a title

@SamVerschueren
Copy link
Contributor

Seems ok, not much to it :).

@jamestalmage
Copy link
Contributor

@SamVerschueren Does it need something additional to enable chaining?

@SamVerschueren
Copy link
Contributor

Yes, this will only allow you to write test.todo('message'). But todo doesn't allow chaining right?

@jamestalmage
Copy link
Contributor

jamestalmage commented May 22, 2016

But todo doesn't allow chaining right

We aren't actively preventing it, but I can't really think of a reason you ever would:

test.serial.todo
test.after.todo

None of those make any sense. Maybe we should prevent modifiers on a todo

@jamestalmage
Copy link
Contributor

Merging. We can debate what to do about todo chaining in #847.

@jamestalmage jamestalmage merged commit ea9c752 into avajs:master May 23, 2016
@sindresorhus
Copy link
Member

@ivogabe @SamVerschueren Could either of you add test.failing?

https://github.com/avajs/ava#failing-tests

@SamVerschueren
Copy link
Contributor

Yeah sure.

@jamestalmage
Copy link
Contributor

jamestalmage commented May 24, 2016

While you are at it, I think there's an error when it comes to using test.serial.

test.serial tests are allowed to return a promise, or have callbacks.

test.serial.cb is totally allowed, as is test.serial(promiseReturning).

The point of test.serial, is that it makes the tests run independently without contention. .serial tests are run first, and one at a time, whereas the default is to run with max concurrency. They are allowed to be async, via .cb or returning a Promise/Observable.

Right now, it looks like .serial tests are not allowed to return a promise, and that .cb.serial and .serial.cb are invalid chains.

@SamVerschueren
Copy link
Contributor

I think you're right (not tested yet). It looks like test.serial.cb is not defined.

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.

5 participants