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

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.

主站蜘蛛池模板: 开远市| 汉中市| 怀化市| 西昌市| 辽宁省| 奇台县| 台州市| 楚雄市| 乌苏市| 鲜城| 兴化市| 义马市| 香格里拉县| 栖霞市| 灵宝市| 德江县| 应用必备| 安吉县| 黔江区| 罗山县| 竹山县| 墨脱县| 红原县| 祁连县| 西吉县| 平凉市| 平乐县| 闽清县| 广水市| 佛冈县| 油尖旺区| 同心县| 利辛县| 沙河市| 蓝田县| 昭平县| 台北县| 金坛市| 丹巴县| 江城| 宜州市|