【发布时间】:2018-06-28 21:44:05
【问题描述】:
在我的 VSCode 中的 node.js 项目中,我试图在运行规范之前读取配置信息。但是我的规范总是在我的“beforeAll”块之前首先执行。
beforeAll(() => {
console.log('Step0………..: ');
return new Promise(resolve => {
console.log('Step1………..: ');
browser.getProcessedConfig().then((config) => {
console.log('environment 12: ' );
resolve(true);
});
});
});
describe('*************************Executing TestSuite************************', function () {
console.log('Step2………..: ');
it("should support async execution of test preparation and expectations", function() {
expect(3).toBeGreaterThan(0);
});
});//describe
我尝试简化代码以仅保留一个期望语句,但仍保持不变。
我得到的当前输出是 Step 2 , Step 0 , Step 1
我期待的是第 0 步、第 1 步、第 2 步
【问题讨论】:
标签: javascript node.js jasmine protractor