-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathtest.js
25 lines (25 loc) · 957 Bytes
/
test.js
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
var subject = require('./subject.js')
var mock = require('mock-fs');
subject.inc(0,undefined);
subject.inc('-3','10');
subject.inc('-8','undefined');
mock({"path/fileExists":{},"pathContent":{"file1":"text content"}});
subject.fileTest('path/fileExists','pathContent/file1');
mock.restore();
mock({"pathContent":{"file1":"text content"}});
subject.fileTest('path/fileExists','pathContent/file1');
mock.restore();
mock({});
subject.fileTest('path/fileExists','pathContent/file1');
mock.restore();
mock({"path/fileExists":{}});
subject.fileTest('path/fileExists','pathContent/file1');
mock.restore();
mock({"path/fileExists":{},"pathContent":{"file1":""}});
subject.fileTest('path/fileExists','pathContent/file1');
mock.restore();
subject.normalize('212-113-669');
subject.normalize('056-491-3162');
subject.format('891-354-9104','(###) ###-#### x#####',{normalize:true});
subject.blackListNumber('212-113-669');
subject.blackListNumber('366-899-5258');