Business Plan

Recently I did a Business Plan presentation with my friend vishal for our startup “The Students Center” and i just want to share that experience. Studying about the business plan in theory and doing…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Automating Karma and headless Chrome with Puppeteer

If you want to configure karma to use headless Chrome in a completely automated way without a global install of Chrome, this post is for you.

So enough talk, and let’s get started.

npm install --save-dev puppeteer karma-chrome-launcher

Now, I might have lied a little bit. We’re not going to use Chrome for this. We’re going to use Chromium. Why Chromium and not Chrome? Because Google Chrome requires you to accept a License Agreement on install, and that requires administration privileges which would defeat the whole purpose of having a local installation. In terms of running your tests, this shouldn’t have any relevant difference.

Just place the following code in your karma.conf.js file:

Fill in the rest of your karma configuration, and you should be ready to go.

With this new puppeteer method, the code will become much simpler:

And that’s it. Let me know in the comments if you have found a better way to do this.

Add a comment

Related posts:

Building Tomorrow

In a world that is becoming more 0s and 1s more than letters on a page, we the engineers have more work to do. I’m not sure if anybody would have predicted the technological boom that has…

Reflections from Guatemala

We did so much more than the site visit to Alconá. We were invited to an opening of a new school in another town within Joyabaj called Chosavic. This town was once only a couple dozen families, with…

FIFA 18 Switch Code Download Tutorial

You might be a switch player who trying to find a fifa 18 switch code generator ? No worries! We got your back. So we are going to show a guide on that which includes free switch codes too. Right now…