Skip to content

Commit 58f6b7f

Browse files
author
Stone Lasley
authored
Merge pull request stonelasley#17 from leifwells/update/readme-with-faq
Added FAQ (one question) to README
2 parents 0ac653a + c1de91b commit 58f6b7f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,28 @@ TestBed.configureTestingModule({
131131
]
132132
});
133133
```
134+
135+
### Frequently Asked Questions:
136+
137+
#### Q: I am receiving a `TypeError: jit__object_Object_33 is not a function` error. What does that mean?
138+
139+
Answer: This means you've done something wrong. Take a look at this example:
140+
141+
```ts
142+
// DO NOT DO THIS
143+
// USING useClass INSTEAD OF useFactory IS INCORRECT
144+
{ provide: App, useClass: AppMock }
145+
```
146+
```ts
147+
// DO NOT DO THIS
148+
// USING useFactory WITHOUT THE FAT ARROW SYNTAX IS INCORRECT
149+
{ provide: App, useFactory: AppMock.instance() }
150+
```
151+
152+
Make sure you are using the `useFactory` property name and using the fat arrow function as the value:
153+
154+
```ts
155+
// DO THIS
156+
{ provide: App, useClass: () => AppMock.instance() }
157+
```
158+

0 commit comments

Comments
 (0)