Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/test-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ test('hasExclusive is set when an exclusive test is added', t => {
t.end();
});

test('title is callee$0$0', t => {
const collection = new TestCollection();
collection.add(mockTest({}, 'callee$0$0'));
t.strictDeepEqual(serialize(collection), {
tests: {
concurrent: titles(collection.tests.concurrent)
}
});
t.end();
});

test('adding a concurrent test', t => {
const collection = new TestCollection();
collection.add(mockTest({}, 'foo'));
Expand Down
10 changes: 10 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ test('title is optional', t => {
t.end();
});

test('title is callee$0$0', t => {
const result = ava(a => {
a.pass();
}).run();

t.is(result.passed, true);
t.is(result.result.title, '[anonymous]');
t.end();
});

test('callback is required', t => {
t.throws(() => {
ava();
Expand Down