1
1
import test from 'ava'
2
2
3
- import { Substitute , Arg , SubstituteOf , received , mimicks , resolves , returns } from '../../src'
3
+ import { Substitute , Arg , SubstituteOf , received } from '../../src'
4
4
5
5
class Dummy {
6
6
@@ -116,16 +116,16 @@ test('class method received', t => {
116
116
`Expected to receive 7 method calls matching c('hi', 'there'), but received 4.\n` +
117
117
'All property or method calls to @Substitute.c received so far:\n' +
118
118
`› ✔ @Substitute.c('hi', 'there')\n` +
119
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:114 :18)\n` +
119
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:105 :18)\n` +
120
120
`› ✘ @Substitute.c('hi', 'the1re')\n` +
121
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:115 :18)\n` +
121
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:106 :18)\n` +
122
122
`› ✔ @Substitute.c('hi', 'there')\n` +
123
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:116 :18)\n` +
123
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:107 :18)\n` +
124
124
`› ✔ @Substitute.c('hi', 'there')\n` +
125
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:117 :18)\n` +
125
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:108 :18)\n` +
126
126
`› ✔ @Substitute.c('hi', 'there')\n` +
127
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:118 :18)\n`
128
- const { message } = t . throws ( ( ) => { substitute . received ( 7 ) . c ( 'hi' , 'there' ) } )
127
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:109 :18)\n`
128
+ const { message } = t . throws ( ( ) => { substitute [ received ] ( 7 ) . c ( 'hi' , 'there' ) } )
129
129
t . is ( message . replace ( textModifierRegex , '' ) , expectedMessage )
130
130
} )
131
131
@@ -143,8 +143,8 @@ test('received call matches after partial mocks using property instance mimicks'
143
143
`Expected to receive 2 method calls matching c('lala', 'bar'), but received 1.\n` +
144
144
'All property or method calls to @Substitute.c received so far:\n' +
145
145
`› ✔ @Substitute.c('lala', 'bar')\n` +
146
- ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:145 :13)\n`
147
- const { message } = t . throws ( ( ) => substitute . received ( 2 ) . c ( 'lala' , 'bar' ) )
146
+ ` called at <anonymous> (${ process . cwd ( ) } /spec/regression/index.test.ts:136 :13)\n`
147
+ const { message } = t . throws ( ( ) => substitute [ received ] ( 2 ) . c ( 'lala' , 'bar' ) )
148
148
t . is ( message . replace ( textModifierRegex , '' ) , expectedMessage )
149
149
t . deepEqual ( substitute . d , 1337 )
150
150
} )
0 commit comments