Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pw.test.js « test « npm-user-validate « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d57401da0b5d2ffa995672e3b46a8a5f856a987f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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()
})