-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
33 lines (19 loc) · 782 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
test("this bit should describe, to a human, what the test is for", function() {
equal( 1, 1);
});
test("check that the header exist", function() {
var iframe = document.getElementById('if-index');
var target = iframe.contentDocument || iframe.contentWindow.document;
var initial = target.getElementById('heading');
var upper = getComputedStyle(initial,null).textTransform;
equal(initial.innerHTML, 'The test of both worlds', 'header text is right and exists');
equal(upper, "uppercase", 'uppercase');
});
test("add function", function() {
var x=Math.floor(Math.random()*1000);
var y=Math.floor(Math.random()*1000);
equal(add(x,y), x+y, 'it works');
equal(add(10,2),12)
});
// test("Has the CSS loaded?", function() {
// } )