Skip to content

Commit 05c842d

Browse files
author
Johannes J. Schmidt
committed
chore: use t.error expectation
1 parent e0a8268 commit 05c842d

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

test/test-configure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ var configure = require('../lib/configure')
44

55
test('configure', function(t) {
66
helper.clearConfig(function(error) {
7-
t.notOk(error, 'no error occured')
7+
t.error(error, 'no error occured')
88

99
configure(helper.couch, helper.source, {}, function(error, responses) {
10-
t.notOk(error, 'no error occured')
10+
t.error(error, 'no error occured')
1111

1212
helper.couch.request({
1313
path: '_config/couchdb-bootstrap/foo'

test/test-couchdb-bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var bootstrap = require('..')
44

55
test('basics', function(t) {
66
bootstrap(helper.url, helper.source, function(error, response) {
7-
t.notOk(error, 'no error occured')
7+
t.error(error, 'no error occured')
88

99
t.end()
1010
})

test/test-map-db-name-option.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test('options.mapDbName is object', function(t) {
88
'test-couchdb-bootstrap': 'custom-db-name'
99
}
1010
}, function(error, response) {
11-
t.notOk(error, 'no error occured')
11+
t.error(error, 'no error occured')
1212

1313
t.ok(response.secure['custom-db-name'].ok, 'creates security in db with custom name')
1414
t.ok(response.push['custom-db-name'], 'pushes docs to db with custom name')
@@ -21,7 +21,7 @@ test('options.mapDbName is function', function(t) {
2121
bootstrap(helper.url, helper.source, {
2222
mapDbName: function (name) { return name.replace('test', 'foobar') }
2323
}, function(error, response) {
24-
t.notOk(error, 'no error occured')
24+
t.error(error, 'no error occured')
2525

2626
t.ok(response.secure['foobar-couchdb-bootstrap'], 'creates security in db with custom name')
2727
t.ok(response.push['foobar-couchdb-bootstrap'], 'pushes docs to db with custom name')

test/test-push.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ var push = require('../lib/push')
44

55
test('push docs', function(t) {
66
helper.setup(function(error) {
7-
t.notOk(error, 'no error occured')
7+
t.error(error, 'no error occured')
88

99
push(helper.couch, helper.source, {}, function(error, response) {
10-
t.notOk(error, 'no error occured')
10+
t.error(error, 'no error occured')
1111

1212
Object.keys(helper.docs).forEach(function(db) {
1313
t.ok(db in response, db + ' included')

test/test-secure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ function setup(callback) {
88

99
test('setup database securities', function(t) {
1010
setup(function(error) {
11-
t.notOk(error, 'no error occured')
11+
t.error(error, 'no error occured')
1212

1313
secure(helper.couch, helper.source, {}, function(error, responses) {
14-
t.notOk(error, 'no error occured')
14+
t.error(error, 'no error occured')
1515

1616
helper.dbnames.forEach(function(dbname) {
1717
t.ok(responses[dbname].ok, 'response is ok')

test/test-utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ var test = require('tape')
22
var utils = require('../lib/utils')
33

44
test('group by database', function(t) {
5-
utils.groupByDatabase('foo', function(err, result) {
6-
t.notOk(err, 'no error occured')
5+
utils.groupByDatabase('foo', function(error, result) {
6+
t.error(error, 'no error occured')
77
t.ok(result.foo === 'bar', 'result is ok')
88
t.end()
99
})(null, 'bar')
1010
});
1111

1212
test('group by database proxies error', function(t) {
13-
utils.groupByDatabase('foo', function(err, result) {
14-
t.ok(err, 'expected error occured')
13+
utils.groupByDatabase('foo', function(error, result) {
14+
t.ok(error, 'expected error occured')
1515
t.end()
1616
})(new Error('boom'))
1717
});

0 commit comments

Comments
 (0)