官术网_书友最值得收藏!

Promoting variables

Both of our tests use the same two variables: container and customer. We can pull up these declarations to the outer describe scope, but leave the definitions within the tests. Since we'll be splitting declaration and definition, that also means we'll need to use let instead of const:

Just above the first test, write the following two lines:

let container;
let customer;

Then, remove the word const from both of the tests, and re-run your tests, which should still be passing.

主站蜘蛛池模板: 临泽县| 莱芜市| 大厂| 康乐县| 广宗县| 阿克苏市| 舒城县| 沽源县| 亳州市| 长沙县| 湄潭县| 藁城市| 衡阳县| 郎溪县| 思南县| 宁河县| 徐州市| 泗洪县| 宜良县| 阳朔县| 崇阳县| 宿迁市| 松桃| 苗栗县| 九寨沟县| 社会| 蓬安县| 太和县| 始兴县| 邹平县| 高唐县| 农安县| 宜宾市| 囊谦县| 乌拉特中旗| 禹城市| 双峰县| 喀喇| 大余县| 上思县| 南江县|