{"size": 943, "ext": "js", "max_stars_repo_path": "test/util/testMath.js", "max_stars_repo_name": "baronwei6668/node-learn", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "test/util/testMath.js", "max_issues_repo_name": "baronwei6668/node-learn", "max_issues_repo_issues_event_min_datetime": "2020-02-19T18:54:09.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T10:00:40.000Z", "max_forks_repo_path": "test/util/testMath.js", "max_forks_repo_name": "baronwei6668/node-learn", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 25.4864864865, "max_line_length": 54, "alphanum_fraction": 0.5885471898}
'use strict'
// mocha+chai+assert(原生)
const math = require('../../src/util/math')
// mocha 自动引入，此处导入只是为了eslint不报错
const { describe, it } = require('mocha')
// BDD
const { expect } = require('chai')
// TDD
const assert = require('assert')

assert.deepEqual(math.add(3, 5), 8)
assert.deepEqual(math.mul(3, 5), 15)

// chai.should()
// math.add(2, 1).should.to.equal(3)
// math.mul(2, 1).should.to.equal(2)

// expect(math.add(3, 5)).to.be.a('number')
// expect(math.mul(3, 6)).to.equal(18)

// npm coverage进行run
describe('math', function() {
  describe('#add()', function() {
    it('should return 5 when 2 + 3', function() {
      expect(math.add(2, 3)).to.be.a('number')
    })
    it.skip('should return 7 when 3 + 4', function() {
      expect(math.add(2, 3)).to.be.a('number')
    })
  }),
    describe('#mul()', function() {
      it('should return 6 when 2 * 3', function() {
        expect(math.mul(2, 3)).to.equal(6)
      })
    })
})
