-
-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
by always expecting "Hello, World!" Change in x-common: [here](exercism/problem-specifications#544) Upcoming new exercise to kinda replace `hello-world`: [here](exercism/problem-specifications#759) Since this `hello-world` is just meant to be a sanity check for everything working, I also went ahead and removed the use of class for the sake of simplicity. We can introduce classes with the next `two-fer` exercise.
- Loading branch information
1 parent
8764748
commit 9e0305b
Showing
3 changed files
with
11 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
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; |
This file contains 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
This file contains 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
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!'); | ||
}); | ||
}); | ||
|