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

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.

主站蜘蛛池模板: 龙山县| 泗阳县| 曲松县| 黑龙江省| 阿尔山市| 灵山县| 正蓝旗| 张掖市| 兴和县| 淮北市| 双桥区| 吴川市| 阿尔山市| 葵青区| 沾益县| 海晏县| 平利县| 银川市| 津南区| 印江| 镇平县| 盐津县| 格尔木市| 古蔺县| 丹寨县| 封开县| 新蔡县| 博白县| 镇坪县| 二手房| 临城县| 尼勒克县| 太康县| 云和县| 隆化县| 凯里市| 天水市| 许昌市| 南和县| 新蔡县| 浦城县|