Welcome to mirror list, hosted at ThFree Co, Russian Federation.

qunit.spec.js « interfaces « acceptance « test « mocha-3.1.0 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d452e769c5c92b79f70909855d89fc1c4e809274 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function ok(expr, msg) {
  if (!expr) throw new Error(msg);
}

suite('integer primitives');

test('should add', function(){
  var number = 2 + 2;
  ok(number == 4);
});

test('should decrement', function(){
  var number = 3;
  ok(--number == 2);
  ok(--number == 1);
  ok(--number == 0);
});

suite('String');

test('#length', function(){
  ok('foo'.length == 3);
});