Skip to content

Commit 66e5616

Browse files
fix due refactor and export clear type
1 parent 9190d17 commit 66e5616

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/SubstituteException.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import { PropertyType } from './Types'
12
import { RecordedArguments } from './RecordedArguments'
2-
import { PropertyType, stringifyArguments, stringifyCalls, textModifier, plurify } from './Utilities'
3+
import { PropertyType as PropertyTypeMap, stringifyArguments, stringifyCalls, textModifier, plurify } from './Utilities'
34

45
enum SubstituteExceptionTypes {
56
CallCountMissMatch = 'CallCountMissMatch',
@@ -26,7 +27,7 @@ export class SubstituteException extends Error {
2627
count.expected === undefined ? '1 or more' : count.expected.toString()
2728
)} ${plurify('call', count.expected)} to the ${textModifier.italic(property.type)} ${propertyValue}`
2829

29-
const messageForMethods = property.type === PropertyType.method ? ` with ${stringifyArguments(calls.expected)}` : '' // should also apply for setters (instead of methods only)
30+
const messageForMethods = property.type === PropertyTypeMap.Method ? ` with ${stringifyArguments(calls.expected)}` : '' // should also apply for setters (instead of methods only)
3031
const receivedMessage = `, but received ${textModifier.bold(count.received < 1 ? 'none' : count.received.toString())} of such calls.`
3132

3233
const callTrace = calls.received.length > 0

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { Substitute, SubstituteOf } from './Substitute'
22

33
export { Arg } from './Arguments'
44
export { Substitute, SubstituteOf }
5+
export { ClearType } from './Utilities'
56

67
export default Substitute

0 commit comments

Comments
 (0)