11import test from 'ava'
22
3- import { Substitute , Arg , SubstituteOf , received , mimicks , resolves , returns } from '../../src'
3+ import { Substitute , Arg , SubstituteOf , received } from '../../src'
44
55class Dummy {
66
@@ -116,16 +116,16 @@ test('class method received', t => {
116116 `Expected to receive 7 method calls matching c('hi', 'there'), but received 4.\n` +
117117 'All property or method calls to @Substitute.c received so far:\n' +
118118 `› ✔ @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` +
120120 `› ✘ @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` +
122122 `› ✔ @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` +
124124 `› ✔ @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` +
126126 `› ✔ @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' ) } )
129129 t . is ( message . replace ( textModifierRegex , '' ) , expectedMessage )
130130} )
131131
@@ -143,8 +143,8 @@ test('received call matches after partial mocks using property instance mimicks'
143143 `Expected to receive 2 method calls matching c('lala', 'bar'), but received 1.\n` +
144144 'All property or method calls to @Substitute.c received so far:\n' +
145145 `› ✔ @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' ) )
148148 t . is ( message . replace ( textModifierRegex , '' ) , expectedMessage )
149149 t . deepEqual ( substitute . d , 1337 )
150150} )
0 commit comments