mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
526 B
32 lines
526 B
var test = require('tap').test
|
|
var v = require('../npm-user-validate.js').pw
|
|
|
|
test('pw contains a \'', function (t) {
|
|
err = v('\'')
|
|
t.type(err, 'null')
|
|
t.end()
|
|
})
|
|
|
|
test('pw contains a :', function (t) {
|
|
err = v(':')
|
|
t.type(err, 'null')
|
|
t.end()
|
|
})
|
|
|
|
test('pw contains a @', function (t) {
|
|
err = v('@')
|
|
t.notOk(err, 'null')
|
|
t.end()
|
|
})
|
|
|
|
test('pw contains a "', function (t) {
|
|
err = v('"')
|
|
t.type(err, 'null')
|
|
t.end()
|
|
})
|
|
|
|
test('pw is ok', function (t) {
|
|
err = v('duck')
|
|
t.type(err, 'null')
|
|
t.end()
|
|
})
|
|
|