Last active
September 14, 2015 10:52
-
-
Save robinboehm/8977139 to your computer and use it in GitHub Desktop.
task variable references
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" type="text/css" href="bower_components/jasmine/lib/jasmine-core/jasmine.css"> | |
<link rel="stylesheet" type="text/css" href="css/jasmine.css"> | |
</head> | |
<body> | |
<script src="bower_components/jasmine/lib/jasmine-core/jasmine.js"></script> | |
<script src="bower_components/jasmine/lib/jasmine-core/jasmine-html.js"></script> | |
<script src="bower_components/jasmine/lib/jasmine-core/boot.js"></script> | |
<!-- App --> | |
<script src="task.js"></script> | |
<!-- Spec --> | |
<script src="spec.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("A variable a", function () { | |
it("should be defined", function () { | |
expect(a).toBeDefined(); | |
}); | |
it("should be a number", function () { | |
expect(typeof a).toBe('number'); | |
}); | |
it("should be 1", function () { | |
expect(a).toBe(1); | |
}); | |
}); | |
describe("A variable b", function () { | |
it("should be defined", function () { | |
expect(b).toBeDefined(); | |
}); | |
it("should be a number", function () { | |
expect(typeof b).toBe('number'); | |
}); | |
it("should be 1", function () { | |
expect(b).toBe(1); | |
}); | |
}); | |
describe("A variable valueOfVariable_b", function () { | |
it("should be defined", function () { | |
expect(valueOfVariable_b).toBeDefined(); | |
}); | |
it("should be a number", function () { | |
expect(typeof valueOfVariable_b).toBe('number'); | |
}); | |
it("should be show the correct value of b", function () { | |
expect(valueOfVariable_b).toBe(b); | |
}); | |
}); | |
describe("A variable objectA", function () { | |
it("should be defined", function () { | |
expect(objectA).toBeDefined(); | |
}); | |
it("should be a array", function () { | |
expect(objectA instanceof Array).toBe(true); | |
}); | |
it("should be [1,2,3]", function () { | |
expect(objectA).toEqual([1, 2, 3]); | |
}); | |
}); | |
describe("A variable objectB", function () { | |
it("should be defined", function () { | |
expect(objectB).toBeDefined(); | |
}); | |
it("should be a array", function () { | |
expect(objectB instanceof Array).toBe(true); | |
}); | |
it("should be objectB == objectA", function () { | |
expect(objectB).toBe(objectA); | |
}); | |
}); | |
describe("A variable valueOfVariable_objectB", function () { | |
it("should be defined", function () { | |
expect(valueOfVariable_objectB).toBeDefined(); | |
}); | |
it("should define the correct value of b ( may an array? ;) )", function () { | |
expect(valueOfVariable_objectB instanceof Array).toBe(true); | |
}); | |
it("should be show the correct value of b", function () { | |
expect(valueOfVariable_objectB).toEqual(objectB); | |
}); | |
it("should be show the correct value of b(please write the actual value not just the reference)", function () { | |
expect(valueOfVariable_objectB).not.toBe(objectB); | |
}); | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment