@@ -18,6 +18,44 @@ var stringBadKeys = [
1818 { type : 'invalid' , key : '61616161616161616161616161616161616161616161616161616161616161612' }
1919]
2020
21+ test ( 'resolve key with path' , function ( t ) {
22+ t . plan ( 2 )
23+ datResolve ( '87ed2e3b160f261a032af03921a3bd09227d0a4cde73466c17114816cae43336/path' , function ( err , newKey ) {
24+ console . log ( 'KEYPATH' , err , newKey )
25+ t . notOk ( err , 'not expected error' )
26+ t . ok ( newKey , 'is a key' )
27+ } )
28+ } )
29+
30+ /*
31+ test('resolve hostname with path', function (t) {
32+ t.plan(2)
33+ datResolve('beakerbrowser.com/path', function (err, newKey) {
34+ console.log('HOSTNAMEPATH', err, newKey)
35+ t.notOk(err, 'not expected error')
36+ t.ok(newKey, 'is a key')
37+ })
38+ })
39+ */
40+
41+ test ( 'resolve key with version' , function ( t ) {
42+ t . plan ( 2 )
43+ datResolve ( '87ed2e3b160f261a032af03921a3bd09227d0a4cde73466c17114816cae43336+5' , function ( err , newKey ) {
44+ console . log ( 'KEYVERSION' , err , newKey )
45+ t . notOk ( err , 'not expected error' )
46+ t . ok ( newKey , 'is a key' )
47+ } )
48+ } )
49+
50+ test ( 'resolve hostname with version' , function ( t ) {
51+ t . plan ( 2 )
52+ datResolve ( 'beakerbrowser.com+5' , function ( err , newKey ) {
53+ console . log ( 'HOSTNAMEVERSION' , err , newKey )
54+ t . notOk ( err , 'not expected error' )
55+ t . ok ( newKey , 'is a key' )
56+ } )
57+ } )
58+
2159test ( 'resolve bad key without http' , function ( t ) {
2260 t . plan ( 2 * stringBadKeys . length ) // 2 tests for 2 keys
2361 stringBadKeys . forEach ( function ( key ) {
0 commit comments