forked from coreyhaines/coderetreat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request coreyhaines#22 from dcarral/add-jasmine-node-template
Add 'Jasmine on Node' template
- Loading branch information
Showing
6 changed files
with
190 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Jasmine on Node.js | ||
|
||
This directory contains a basic project template using [_Node.js_](https://nodejs.org/) and [_Jasmine_](https://jasmine.github.io/). | ||
|
||
To install dependencies: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
To run the test suite: | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
Happy hacking! :-) | ||
|
||
Note: After switching between _Node.js_ versions, `npm test` can result in an error. Removing the `node_modules` directory (with `rm -rf node_modules`) should fix it. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "kata-bootstrap-node-jasmine", | ||
"version": "0.0.1", | ||
"description": "Basic project template using Node.js and Jasmine.", | ||
"main": "index.js", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"jasmine": "^2.8.0" | ||
}, | ||
"scripts": { | ||
"test": "jasmine spec/**/*.js" | ||
}, | ||
"keywords": [ | ||
"kata", | ||
"dojo", | ||
"bootstrap", | ||
"skeleton", | ||
"jasmine", | ||
"node" | ||
], | ||
"author": "Daniel Carral", | ||
"license": "MIT" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const HelloWorld = require('../src/HelloWorld'); | ||
|
||
describe('HelloWorld', () => { | ||
describe('#greet', () => { | ||
it('returns the classic hello world', () => { | ||
const expectedGreet = 'Hello, world!'; | ||
|
||
expect(HelloWorld.greet()).toEqual(expectedGreet); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"spec_dir": "spec", | ||
"spec_files": [ | ||
"**/*[sS]pec.js" | ||
], | ||
"helpers": [ | ||
"helpers/**/*.js" | ||
], | ||
"stopSpecOnExpectationFailure": false, | ||
"random": false | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class HelloWorld { | ||
static greet() { | ||
return 'Hello, world!'; | ||
} | ||
} | ||
|
||
module.exports = HelloWorld; |