Sometimes we need to test localhost out on a public URL, for various reasons. We can do that with ngrok, which is a service that projects localhost ports onto a generated public URL.
Continue readingCategory Archives: Testing
JavaScript Testing: How to Mock Static Variables
When we have $ctrl
created by $componentController
, how to mock static members of a class?
let $ctrl = $componentController("funny-component", null);
Angular Testing: Understanding $componentConstructor
Angular testing can be confusing. To make it less confusing, lets talk about a major part: $componentController
.
Jasmine: Only Test One Spec
Use fdescribe
and fit
in places of describe
and it
.
Disable “Line exceeds maximum allowed length” in Coffee Lint
Find max_line_length
in your coffeelint.json
file:
Protractor Locators (Selectors)
This is a nice list to keep for reference somewhere:
Using Karma With RequireJS
Since I was trying to dig deep into AngularJS, I thought I’d give tests a go. Then I ran into Jasmine. And Intern. And Karma. And it wails about no timestamps.