0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windowsで karma start が落ちる!

Last updated at Posted at 2016-02-12

【npm + Karma + Jasmine】JavaScriptの単体テスト環境を構築する
上記投稿を参考にWindowsでもkarmaを実行させてみた。

mac環境であれば、まったく問題がなかったのだが、Windowsで実行すると、「The header content contains invalid characters」というエラーが出た。

エラーの内容から、setHeaderをしているとこでコケているのが分かった、該当箇所の部分を以下のように、とりあえずコメントアウト

common.js
var setNoCacheHeaders = function (response) {
  response.setHeader('Cache-Control', 'no-cache')
  response.setHeader('Pragma', 'no-cache')
  //response.setHeader('Expires', (new Date(0)).toString())
  // ↑これを、こう!!
}

この状態で、karma startすることで動きました!

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?