Error with Angular unit testing with @ngneat/spectator #555
Unanswered
sarathkrishna99
asked this question in
Q&A
Replies: 1 comment
-
@sarathkrishna99 I'm going to guess that you're getting the failure from the first line, and if you look at that point you'll see that tableRowsPerPageOptions is actually undefined. So this bug isn't really related to spectator, it's just that you're assuming the value is set when it's really not. You might need to trigger an event, wait for change detection, etc... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I wrote the below unit test using @ngneat/spectator
But when I ran the above test, I am getting the below error. Can you please tell me what I am doing wrong
TableComponent > should set intial values for rowsPerPageOptions
Failed: Cannot read properties of undefined (reading 'length')
error properties: Object({ longStack: 'TypeError: Cannot read properties of undefined (reading 'length')
Beta Was this translation helpful? Give feedback.
All reactions