demo.js 291 B

1234567891011121314
  1. /**
  2. * Created by Tony on 2017/3/16.
  3. */
  4. var test = require('tape');
  5. test('basic arithmetic', function (t) {
  6. t.equal(2 + 3, 5);
  7. t.equal(7 * 8 + 9, 65);
  8. t.equal(/^-?\d+$/.test("10"), true);
  9. //t.equal(isNaN(10.1), true);
  10. t.equal(Math.round(10.4999), 10);
  11. t.end();
  12. });