質問編集履歴
3
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
scssファイルがcompileされたか確認するテストコードの書き方が不明(create-react-app, mocha)
|
test
CHANGED
File without changes
|
2
コードの記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,11 +32,27 @@
|
|
32
32
|
|
33
33
|
---
|
34
34
|
|
35
|
-
この変更でmochaを使用し、テストコード
|
35
|
+
この変更でmochaを使用し、テストコード書く必要有。
|
36
36
|
|
37
|
-
例えばjsファイルの中に関数があり、引数がstringじゃなかったらreturn errorになるよ。
|
38
37
|
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
describe('test file exists', function () {
|
42
|
+
|
43
|
+
it('should src/index.css', function () {
|
44
|
+
|
45
|
+
if(file_exists(src/index.css));
|
46
|
+
|
47
|
+
});
|
48
|
+
|
49
|
+
});
|
50
|
+
|
51
|
+
```
|
52
|
+
|
39
|
-
|
53
|
+
このようにcompile後にindex.cssにcompileされているかどうかのテストをしたいですが、上手くいきません。
|
54
|
+
|
55
|
+
また「npm run compile:sass」を実行後 -> src/index.cssに反映されているか。 をテストコードに記載したいですがscriptの実行をテストコードに書く方法が不明です。
|
40
56
|
|
41
57
|
|
42
58
|
|
1
題名の変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Sassファイル追加 -> mochaにてテストコード必要
|
1
|
+
Sassファイル追加 -> mochaにてテストコード必要 (create-react-app)
|
test
CHANGED
File without changes
|