3
3
/* eslint max-nested-callbacks: ["error", 8] */
4
4
'use strict'
5
5
6
+ const chai = require ( 'chai' )
7
+ chai . use ( require ( 'dirty-chai' ) )
8
+ const expect = chai . expect
6
9
const pull = require ( 'pull-stream' )
7
- const expect = require ( 'chai' ) . expect
8
10
const series = require ( 'async/series' )
9
11
10
12
const Key = require ( 'interface-datastore' ) . Key
@@ -45,7 +47,7 @@ describe('MountStore', () => {
45
47
series ( [
46
48
( cb ) => m . put ( new Key ( '/cool/hello' ) , val , cb ) ,
47
49
( cb ) => mds . get ( new Key ( '/hello' ) , ( err , res ) => {
48
- expect ( err ) . to . not . exist
50
+ expect ( err ) . to . not . exist ( )
49
51
expect ( res ) . to . eql ( val )
50
52
cb ( )
51
53
} )
@@ -63,7 +65,7 @@ describe('MountStore', () => {
63
65
series ( [
64
66
( cb ) => mds . put ( new Key ( '/hello' ) , val , cb ) ,
65
67
( cb ) => m . get ( new Key ( '/cool/hello' ) , ( err , res ) => {
66
- expect ( err ) . to . not . exist
68
+ expect ( err ) . to . not . exist ( )
67
69
expect ( res ) . to . eql ( val )
68
70
cb ( )
69
71
} )
@@ -81,7 +83,7 @@ describe('MountStore', () => {
81
83
series ( [
82
84
( cb ) => mds . put ( new Key ( '/hello' ) , val , cb ) ,
83
85
( cb ) => m . has ( new Key ( '/cool/hello' ) , ( err , exists ) => {
84
- expect ( err ) . to . not . exist
86
+ expect ( err ) . to . not . exist ( )
85
87
expect ( exists ) . to . eql ( true )
86
88
cb ( )
87
89
} )
@@ -100,12 +102,12 @@ describe('MountStore', () => {
100
102
( cb ) => m . put ( new Key ( '/cool/hello' ) , val , cb ) ,
101
103
( cb ) => m . delete ( new Key ( '/cool/hello' ) , cb ) ,
102
104
( cb ) => m . has ( new Key ( '/cool/hello' ) , ( err , exists ) => {
103
- expect ( err ) . to . not . exist
105
+ expect ( err ) . to . not . exist ( )
104
106
expect ( exists ) . to . eql ( false )
105
107
cb ( )
106
108
} ) ,
107
109
( cb ) => mds . has ( new Key ( '/hello' ) , ( err , exists ) => {
108
- expect ( err ) . to . not . exist
110
+ expect ( err ) . to . not . exist ( )
109
111
expect ( exists ) . to . eql ( false )
110
112
cb ( )
111
113
} )
@@ -126,7 +128,7 @@ describe('MountStore', () => {
126
128
pull (
127
129
m . query ( { prefix : '/cool' } ) ,
128
130
pull . collect ( ( err , res ) => {
129
- expect ( err ) . to . not . exist
131
+ expect ( err ) . to . not . exist ( )
130
132
expect ( res ) . to . eql ( [ {
131
133
key : new Key ( '/cool/hello' ) ,
132
134
value : val
0 commit comments