且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“它"是什么意思?这段代码中的功能是什么?

更新时间:2022-06-20 04:06:31

参见 Jasmine 测试框架.

it(...) 函数定义了一个测试用例(又名规范").

See the Jasmine testing framework.

The it(...) function defines a test case (aka a "spec").

describe("A suite", function() {
  it("contains spec with an expectation", function() {
    expect(true).toBe(true);
  });
});

请注意,AngularJS E2E 测试...

... 使用 Jasmine 作为其测试语法.

... uses Jasmine for its test syntax.