Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions exercises/hello-world/example.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

class HelloWorld {
hello(name = 'World') {
return `Hello, ${name}!`;
}
const helloWorld = () => {
return 'Hello, World!';
}

export default HelloWorld;

export default helloWorld;
13 changes: 5 additions & 8 deletions exercises/hello-world/hello-world.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
// convenience to get you started writing code faster.
//

class HelloWorld {
hello() {
//
// YOUR CODE GOES HERE
//
}
const helloWorld = () => {
//
// YOUR CODE GOES HERE
//
}

export default HelloWorld;

export default helloWorld;
17 changes: 3 additions & 14 deletions exercises/hello-world/hello-world.spec.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import HelloWorld from './hello-world';
import helloWorld from './hello-world';

describe('Hello World', () => {
const helloWorld = new HelloWorld();

it('says hello world with no name', () => {
expect(helloWorld.hello()).toEqual('Hello, World!');
});

xit('says hello to bob', () => {
expect(helloWorld.hello('Bob')).toEqual('Hello, Bob!');
});

xit('says hello to sally', () => {
expect(helloWorld.hello('Sally')).toEqual('Hello, Sally!');
it('says hello', () => {
expect(helloWorld()).toEqual('Hello, World!');
});
});