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

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.

主站蜘蛛池模板: 衢州市| 全南县| 白山市| 赫章县| 临高县| 贵州省| 孝感市| 阜城县| 敖汉旗| 拉萨市| 盖州市| 达州市| 丹阳市| 白朗县| 七台河市| 杭锦后旗| 张家界市| 威信县| 旌德县| 松潘县| 曲麻莱县| 普兰县| 阳东县| 榆树市| 莱阳市| 南召县| 清水河县| 泰宁县| 普安县| 镇江市| 乌兰县| 无为县| 瓦房店市| 颍上县| 措美县| 辽源市| 临颍县| 五原县| 南靖县| 信阳市| 济宁市|