test.js 240 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 const chai = require("chai"); //引入断言的风格 const assert = chai.assert; const expect = chai.expect; describe('加法函数的测试', function () { it('1加1应该等于2', function () { expect(2).to.be.equal(2); }); });