Skip to content

Instantly share code, notes, and snippets.

@robinboehm
Last active August 29, 2015 13:56
Show Gist options
  • Save robinboehm/8972289 to your computer and use it in GitHub Desktop.
Save robinboehm/8972289 to your computer and use it in GitHub Desktop.
task primitives
<!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="primitives.js"></script>
<script src="primitives.spec.js"></script>
</body>
</html>
describe("The variable primitiveNumber", function () {
it("should be defined", function () {
expect(primitiveNumber).toBeDefined();
});
it("should be a primitive number", function () {
expect(typeof primitiveNumber).toBe('number');
});
it("should equal the value 2", function () {
expect(primitiveNumber).toEqual(2);
});
});
describe("A variable objectNumber", function () {
it("should be defined", function () {
expect(objectNumber).toBeDefined();
});
it("should be an object", function () {
expect(typeof objectNumber).toBe('object');
});
it("should define the property foo", function () {
expect(objectNumber.foo).toBeDefined();
});
it("should define the property foo with the string 'bar'", function () {
expect(objectNumber.foo).toBe('bar');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment