質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -326,8 +326,22 @@
|
|
326
326
|
|
327
327
|
|
328
328
|
|
329
|
+
### 追記
|
330
|
+
|
331
|
+
|
332
|
+
|
329
|
-
|
333
|
+
LocalStorageのlengthはプロパティでした。
|
334
|
+
|
330
|
-
|
335
|
+
なのでspyOnは
|
336
|
+
|
331
|
-
|
337
|
+
```typescript
|
338
|
+
|
332
|
-
|
339
|
+
spyOnProperty(localStorage, 'length', 'get').and.returnValue(mockLocalStorage.length());
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
```
|
344
|
+
|
333
|
-
|
345
|
+
となるはずでした。
|
346
|
+
|
347
|
+
しかし、しかし、setItemで何を入れてもstore{}の数が0から変わりません、なぜでしょうか?
|