JestとEnzymeをReact Webpackプロジェクトに追加しようとしています。SyntaxError:無効または予期しないトークン@import
コンポーネントにテストを追加するまで、Googleフォントをインポートするスタイルシートを使用するまで、すべてが機能しています。
私が手にエラーがある:
● Test suite failed to run
/Users/dev/Code/Git/react-redux-webpack/src/App.sass:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){@import url('https://fonts.googleapis.com/css?family=Barlow+Condensed')
^
SyntaxError: Invalid or unexpected token
SASSファイルは次のようになります。
@import url('https://fonts.googleapis.com/css?family=Barlow+Condensed')
body
background: #f9f9f9
color: #444444
font-family: 'Barlow Condensed', sans-serif
text-align: center
.container
width: 100%
max-width: 960px
margin: 0 auto
.container__logo--image
position: absolute
top: 50%
left: 50%
margin-left: -75px
margin-top: -75px
マイ.babelrc:
{
"presets": [
"react",
"stage-0",
[
"env",
{
"targets": {
"node": "6.10",
"browsers": ["last 2 versions", "safari >= 7"]
}
}
]
],
"plugins": ["transform-class-properties"]
}
私はWebPACKの中のすべての必要なローダーを持っています、私は問題なしで一日中酒を作り提供することができます。私が苦労しているJestの紹介です。
私は私のpackage.jsonに以下を追加し、ここでのコードの現在の状態とhttps://github.com/nombienombie/react-redux-webpack/tree/feature/jest-unit-tests