Permalink
Browse files

Added semicolons to the examples :)

  • Loading branch information...
1 parent 6c27a97 commit e493e0100eab90153f3640a800a94669b19c0cc1 @airportyh airportyh committed Aug 29, 2012
@@ -1,3 +1,3 @@
function hello(s){
- return "hello world"
+ return "hello world";
}
@@ -1,5 +1,5 @@
/*global test, assert, hello*/
test('say hello', function() {
- assert(hello() === 'hello world', 'should equal hello world')
-})
+ assert(hello() === 'hello world', 'should equal hello world');
+});
@@ -1,8 +1,8 @@
function hello(){
- return 'hello world'
+ return 'hello world';
}
if (typeof module !== 'undefined' && module.exports){
- module.exports = hello
+ module.exports = hello;
}
@@ -1,40 +1,24 @@
if (typeof require !== 'undefined'){
- var hello = require('./hello')
- var expect = require('chai').expect
+ var hello = require('./hello');
+ var expect = require('chai').expect;
}else{
- var expect = chai.expect
+ var expect = chai.expect;
}
describe('hello', function(){
- it('should say hello', function(done){
- expect(hello()).to.equal('hello world')
- //console.log(hello())
- console.error(hello() + ' to you')
- setTimeout(done, 500)
- })
+ it('should say hello', function(){
+ expect(hello()).to.equal('hello world');
+ });
- it('should also be awesome', function(done){
- //setTimeout(done, 1000)
- //expect('blah').to.equal('blahueo')
-
- done()
- })
+ it('should also delay', function(done){
+ setTimeout(done, 1000);
+ done();
+ });
it('should not change reality', function(done){
-
- //console.error('hello again')
- //expect(1).to.equal(2)
- //setTimeout(done, 1000)
- done()
- })
- it('should error', function(){
- throw new Error('blah')
- })
- it('should blah', function(){
- throw new Error('blah balh ueouo')
-
- })
- it('should blah again', function(){})
-})
+ expect(1).to.equal(2)
+ });
+
+});
@@ -1,3 +1,3 @@
function hello(){
- return "hello world"
+ return "hello world";
}
@@ -1,5 +1,5 @@
describe('hello', function(){
it('should say hello', function(){
- expect(hello()).toBe('hello world')
- })
-})
+ expect(hello()).toBe('hello world');
+ });
+});
@@ -1,7 +1,7 @@
require(
['specs/hello_spec'],
function(){
- var env = jasmine.getEnv()
- env.addReporter(new jasmine.HtmlReporter)
- env.execute()
-})
+ var env = jasmine.getEnv();
+ env.addReporter(new jasmine.HtmlReporter);
+ env.execute();
+});
@@ -3,8 +3,7 @@ define(
function(hello){
describe('hello', function(){
it('should say hello', function(){
- expect(hello()).toBe('hello world')
- })
- })
-})
-
+ expect(hello()).toBe('hello world');
+ });
+ });
+});
@@ -1,6 +1,6 @@
define(function(){
function hello(){
- return 'hello world'
+ return 'hello world';
}
- return hello
-})
+ return hello;
+});
@@ -1,3 +1,3 @@
function hello(){
- return "hello world"
+ return "hello world";
}
@@ -1,8 +1,8 @@
describe('hello', function(){
it('should say hello', function(){
- expect(hello()).toBe('heeello world')
- })
+ expect(hello()).toBe('heeello world');
+ });
it('should do something else', function(){
- expect('blah').toBe('blah blah')
- })
-})
+ expect('blah').toBe('blah');
+ });
+});
@@ -1,3 +0,0 @@
-launch_in_dev:
-- Safari
-- Chrome
@@ -1,7 +1,7 @@
describe('setTimeout', function(){
for (var i = 0; i < 100; i++){
it('should wait for some time (' + (i+1) + ')', function(){
- waits(50)
- })
+ waits(50);
+ });
}
-})
+});
@@ -1,3 +1,3 @@
function hello(){
- return "hello world"
+ return "hello world";
}
@@ -1,5 +1,5 @@
describe('hello', function(){
it('should say hello', function(){
- expect(hello()).to.be('hello world')
- })
-})
+ expect(hello()).to.be('hello world');
+ });
+});
@@ -1,4 +1,4 @@
-var assert = require('assert')
+var assert = require('assert');
function hello(){
return 'hello world';
@@ -1,3 +1,3 @@
function hello(s){
- return "hello world"
+ return "hello world";
}
@@ -1,4 +1,4 @@
test('say hello', function(){
- equal(hello(), 'hello world', 'should equal hello world')
-})
+ equal(hello(), 'hello world', 'should equal hello world');
+});

0 comments on commit e493e01

Please sign in to comment.